eerimoq / asn1tools

ASN.1 parsing, encoding and decoding.
MIT License
292 stars 98 forks source link

OER decoding error #60

Closed ttt710516 closed 5 years ago

ttt710516 commented 5 years ago

I have a simple ASN files as the follows


Test DEFINITIONS AUTOMATIC TAGS ::= BEGIN Abc ::= INTEGER (1..MAX) END


And I write the following code


coer = asn1tools.compile_files('asn1\test.asn', codec='oer') byte_str = bytes.fromhex('0180') print(coer.decode('Abc', byte_str))


I think the result should be 128. However, I got -128. I think it is an incorrect result

eerimoq commented 5 years ago

Thanks for the bug report.

Fixed in version 0.146.4, available on PyPI.

ttt710516 commented 5 years ago

I have tried it. It's nice now. Thanks