Skip to content
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.

Fixing varint and decimal encoding/decoding #118

Closed
wants to merge 1 commit into from

Conversation

ahisbrook
Copy link
Contributor

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 returns 0.0

@iconara
Copy link
Owner

iconara commented Jul 9, 2014

Thanks for hunting down these bugs, I'll merge this in the morning and push up a new gem.

@iconara
Copy link
Owner

iconara commented Jul 10, 2014

Merged through 31d5520. v2.0.3 is up on RubyGems.

@iconara iconara closed this Jul 10, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants