mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Allow passing NULL as second argument to ascii_strtod
We do this in our own sources... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4e6dd75d11
commit
d9f24b282a
1 changed files with 4 additions and 2 deletions
|
@ -323,10 +323,12 @@ double ascii_strtod(char *str, char **ptr)
|
|||
done:
|
||||
if (!numbers)
|
||||
goto no_conversion;
|
||||
if (ptr)
|
||||
*ptr = p-1;
|
||||
return sign ? -val : val;
|
||||
|
||||
no_conversion:
|
||||
if (ptr)
|
||||
*ptr = str;
|
||||
return 0.0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue