gmr / pamqp

Low level AMQP frame encoding and decoding library
https://pamqp.readthedocs.io
BSD 3-Clause "New" or "Revised" License
50 stars 20 forks source link

Table integer should use inclusive ranges #10

Closed everilae closed 6 years ago

everilae commented 9 years ago

https://github.com/gmr/pamqp/blob/master/pamqp/encode.py#L271 will use unnecessarily large formats for corner values of integer types and will not accept LONGLONGMIN and LONGLONGMAX at all. Given ranges should be inclusive, not exclusive as they are.

As a bonus values -32768 < value < 0 will blow up, because short_int is broken (see #7).

gmr commented 6 years ago

Addressed in 1.7.0 to be released today, thanks for the report.