ludocode / mpack

MPack - A C encoder/decoder for the MessagePack serialization format / msgpack.org[C]
MIT License
533 stars 82 forks source link

MPack Node API sees node as NIL instead of float #75

Closed ghost closed 4 years ago

ghost commented 4 years ago

When I feed MPack a msgpack object containing values 12.3 and 14.6, MPack sees them as NIL for some reason (mpack_node_type returns mpack_type_nil and mpack_node_float fails). I've verified with your msgpack2json script that the values are indeed 12.3 and 14.6 in the object.

Environment: os: Linux Mint 19.1 32-bit kernel: Linux 5.3.6-050306-generic i686 ram: 1.9 GB proc: Intel Celeron E3300

ghost commented 4 years ago

@ludocode

ghost commented 4 years ago

I have swapped mpack_node_float for mpack_node_float_strict, did some testing, then reverted the change and somehow it works now. Guess the problem was either somewhere else and I unknowingly fixed it, or it's pure magic. Either way, I'm closing the issue.