quininer / cbor4ii

CBOR: Concise Binary Object Representation
MIT License
54 stars 5 forks source link

core: fix decoding of the maximum negative 64-bit value as i128 #19

Closed vmx closed 2 years ago

vmx commented 2 years ago

Decoding of the maximum negative 64-bit value in CBOR (-2^64 = -18446744073709551616) wasn't possible and resulted in an overflow error.

This commit also adds test for smaller values, e.g. decoding the maximum negative 32-bit as i64. Those were already working correctly.

quininer commented 2 years ago

Thank you! I'll be release a fix version tonight.