Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rencode/_rencode.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ cdef enum:
STR_FIXED_COUNT = 64
# Lists with length embedded in typecode.
LIST_FIXED_START = STR_FIXED_START+STR_FIXED_COUNT
LIST_FIXED_COUNT = 64
LIST_FIXED_COUNT = 63

cdef char _float_bits

Expand Down Expand Up @@ -163,7 +163,7 @@ cdef encode_char(char **buf, unsigned int *pos, signed char x):
write_buffer_char(buf, pos, INT_POS_FIXED_START + x)
elif -INT_NEG_FIXED_COUNT <= x < 0:
write_buffer_char(buf, pos, INT_NEG_FIXED_START - 1 - x)
elif -128 <= x < 128:
elif -128 <= x < 127:
write_buffer_char(buf, pos, CHR_INT1)
write_buffer_char(buf, pos, x)

Expand Down