forked from bblanchon/ArduinoJson
Fixed deserializeJson() not being picky enough (fixes #969)
This commit is contained in:
1 parent
6071bd07ec
commit
6011a2f51a
4 files changed
+12
-2
No files matched your search
@@ -140,6 +140,9 @@ inline ParsedNumber<TFloat, TUInt> parseNumber(const char *s) {
|
||||
}
|
||||
exponent += exponent_offset;
|
||||
|
||||
// we should be at the end of the string, otherwise it's an error
|
||||
if (*s != '\0') return return_type();
|
||||
|
||||
TFloat result = traits::make_float(static_cast<TFloat>(mantissa), exponent);
|
||||
|
||||
return is_negative ? -result : result;
|
||||
|
||||
Reference in new issue
Block a user