1
0
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:
Jan Pochyla 2016-11-11 11:21:31 +01:00
parent cf2bc1a28e
commit b9cec468b7

View File

@ -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