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) {
|
if(*str == 0x00) {
|
||||||
// only space in str?
|
// only space in str?
|
||||||
*endptr = (char*) str;
|
if (endptr) *endptr = (char*) str;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -259,7 +259,7 @@ double ICACHE_FLASH_ATTR strtod(const char* str, char** endptr) {
|
|||||||
|
|
||||||
str++;
|
str++;
|
||||||
}
|
}
|
||||||
*endptr = (char*) str;
|
if (endptr) *endptr = (char*) str;
|
||||||
return result * factor;
|
return result * factor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user