Skip to content

Commit

Permalink
Fix negative integer parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
jagerman committed Jun 2, 2023
1 parent a17753f commit e11f501
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/bencode-dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def next_byte():
def parse_int():
s = b''
x = next_byte()
while x in b"0123456789":
while x in b"0123456789-":
s += x
x = next_byte()
assert x == b'e' and len(s) > 0, "Invalid integer encoding"
Expand Down

0 comments on commit e11f501

Please sign in to comment.