Closed ahisbrook closed 10 years ago
Found several numbers which were encoding/decoding incorrectly. The issue was in append_varint.
Example: append_varint(1042342234234); read_varint returns -57169393542
append_varint(1042342234234); read_varint
-57169393542
Also made a small change to read_decimal which would occasionally fail to decode decimals between -1 and 0.
Example: append_decimal(-0.031108612692221094); read_decimal returns 0.0
append_decimal(-0.031108612692221094); read_decimal
0.0
Thanks for hunting down these bugs, I'll merge this in the morning and push up a new gem.
Merged through 31d5520dcedc49bfd80cb83e3c69c33cfa477b7c. v2.0.3 is up on RubyGems.
Found several numbers which were encoding/decoding incorrectly. The issue was in append_varint.
Example:
append_varint(1042342234234); read_varint
returns-57169393542
Also made a small change to read_decimal which would occasionally fail to decode decimals between -1 and 0.
Example:
append_decimal(-0.031108612692221094); read_decimal
returns0.0