Skip to content
Snippets Groups Projects
Commit 362079c066d9 authored by Ilya Etingof's avatar Ilya Etingof
Browse files

Fix Integer decoder to handle empty payload

parent 916e08d0b712
No related branches found
No related tags found
No related merge requests found
...@@ -139,8 +139,6 @@ ...@@ -139,8 +139,6 @@
if isinstance(chunk, SubstrateUnderrunError): if isinstance(chunk, SubstrateUnderrunError):
yield chunk yield chunk
if not chunk: if chunk:
yield self._createComponent(asn1Spec, tagSet, 0, **options)
value = from_bytes(chunk, signed=True) value = from_bytes(chunk, signed=True)
...@@ -145,5 +143,8 @@ ...@@ -145,5 +143,8 @@
value = from_bytes(chunk, signed=True) value = from_bytes(chunk, signed=True)
else:
value = 0
yield self._createComponent(asn1Spec, tagSet, value, **options) yield self._createComponent(asn1Spec, tagSet, value, **options)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment