forked from bblanchon/ArduinoJson
Fixed JsonVariant::is<int>() that returned true for empty strings
This commit is contained in:
1 parent
954428e341
commit
fa1a40ac6e
3 files changed
+8
-3
No files matched your search
@@ -10,10 +10,10 @@ namespace ArduinoJson {
|
||||
namespace Internals {
|
||||
|
||||
inline bool isInteger(const char* s) {
|
||||
if (!s) return false;
|
||||
if (!s || !*s) return false;
|
||||
if (issign(*s)) s++;
|
||||
while (isdigit(*s)) s++;
|
||||
return *s == '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace Internals
|
||||
} // namespace ArduinoJson
|
||||
Reference in new issue
Block a user