mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +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,11 +323,13 @@ double ascii_strtod(char *str, char **ptr)
|
|||
done:
|
||||
if (!numbers)
|
||||
goto no_conversion;
|
||||
*ptr = p-1;
|
||||
if (ptr)
|
||||
*ptr = p-1;
|
||||
return sign ? -val : val;
|
||||
|
||||
no_conversion:
|
||||
*ptr = str;
|
||||
if (ptr)
|
||||
*ptr = str;
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue