mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
strtod: allow endptr to be null
This commit is contained in:
parent
3b9ea5c837
commit
06676482cc
@ -229,7 +229,7 @@ double ICACHE_FLASH_ATTR strtod(const char* str, char** endptr) {
|
||||
|
||||
if(*str == 0x00) {
|
||||
// only space in str?
|
||||
*endptr = (char*) str;
|
||||
if (endptr) *endptr = (char*) str;
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -259,7 +259,7 @@ double ICACHE_FLASH_ATTR strtod(const char* str, char** endptr) {
|
||||
|
||||
str++;
|
||||
}
|
||||
*endptr = (char*) str;
|
||||
if (endptr) *endptr = (char*) str;
|
||||
return result * factor;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user