forked from bblanchon/ArduinoJson
@ -16,3 +16,4 @@ HEAD
|
|||||||
* Always store `serialized("string")` by copy (#1915)
|
* Always store `serialized("string")` by copy (#1915)
|
||||||
* Remove the zero-copy mode of `deserializeJson()` and `deserializeMsgPack()`
|
* Remove the zero-copy mode of `deserializeJson()` and `deserializeMsgPack()`
|
||||||
* Fix double lookup in `to<JsonVariant>()`
|
* Fix double lookup in `to<JsonVariant>()`
|
||||||
|
* Fix double call to `size()` in `serializeMsgPack()`
|
@ -47,7 +47,7 @@ class MsgPackSerializer : public Visitor<size_t> {
|
|||||||
size_t visitArray(const ArrayData& array) {
|
size_t visitArray(const ArrayData& array) {
|
||||||
size_t n = array.size();
|
size_t n = array.size();
|
||||||
if (n < 0x10) {
|
if (n < 0x10) {
|
||||||
writeByte(uint8_t(0x90 + array.size()));
|
writeByte(uint8_t(0x90 + n));
|
||||||
} else if (n < 0x10000) {
|
} else if (n < 0x10000) {
|
||||||
writeByte(0xDC);
|
writeByte(0xDC);
|
||||||
writeInteger(uint16_t(n));
|
writeInteger(uint16_t(n));
|
||||||
|
Reference in New Issue
Block a user