mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-18 20:38:10 +00:00
streams: fix set_limit
This commit is contained in:
parent
cf2bc1a28e
commit
b9cec468b7
@ -46,7 +46,7 @@ class StreamReader:
|
||||
raising EOF (intended to be restored with another call to
|
||||
`set_limit`).
|
||||
'''
|
||||
if self._limit is not None:
|
||||
if self._limit is not None and n is not None:
|
||||
rem = self._limit - n
|
||||
else:
|
||||
rem = None
|
||||
|
Loading…
Reference in New Issue
Block a user