mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 00:32:37 +01:00 
			
		
		
		
	Fix double call to size() in serializeMsgPack()
				
					
				
			This commit is contained in:
		| @@ -6,6 +6,7 @@ HEAD | ||||
|  | ||||
| * Fix compatibility with the Blynk libary (issue #1914) | ||||
| * Fix double lookup in `to<JsonVariant>()` | ||||
| * Fix double call to `size()` in `serializeMsgPack()` | ||||
|  | ||||
| v6.21.2 (2023-04-12) | ||||
| ------- | ||||
|   | ||||
| @@ -47,7 +47,7 @@ class MsgPackSerializer : public Visitor<size_t> { | ||||
|   size_t visitArray(const CollectionData& array) { | ||||
|     size_t n = array.size(); | ||||
|     if (n < 0x10) { | ||||
|       writeByte(uint8_t(0x90 + array.size())); | ||||
|       writeByte(uint8_t(0x90 + n)); | ||||
|     } else if (n < 0x10000) { | ||||
|       writeByte(0xDC); | ||||
|       writeInteger(uint16_t(n)); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user