Skip to content

Conversation

@vGimly
Copy link

@vGimly vGimly commented Oct 25, 2016

there is a bug with negative numbers in Convert::Bencode - this patch add more complicated support for numbers.

negative numbers, like -1 sould be converted to number "i-1e", not to string "2:-1" like module does.

@m4ddav3
Copy link
Owner

m4ddav3 commented Oct 25, 2016

I agree that this would be a good part to improve. However, I think this change is still imperfect.
If we use Scalar::Util::looks_like_number, it could differentiate between a value which is a number (1, 0, -1), or a string ("1", "0", "-1").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants