mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 08:48:30 +01:00
Made deserializeJson() more picky about trailing characters (closes #980)
This commit is contained in:
@@ -134,17 +134,10 @@ class MsgPackDeserializer {
|
||||
// Prevent VS warning "assignment operator could not be generated"
|
||||
MsgPackDeserializer &operator=(const MsgPackDeserializer &);
|
||||
|
||||
bool skip(uint8_t n) {
|
||||
while (n--) {
|
||||
if (_reader.ended()) return false;
|
||||
_reader.read();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool readByte(uint8_t &value) {
|
||||
if (_reader.ended()) return false;
|
||||
value = static_cast<uint8_t>(_reader.read());
|
||||
int c = _reader.read();
|
||||
if (c < 0) return false;
|
||||
value = static_cast<uint8_t>(c);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user