1
0
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:
Kiril Zyapkov 2015-08-10 16:17:16 +03:00
parent 3b9ea5c837
commit 06676482cc

View File

@ -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;
} }