You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm reviewing your code for a personal project and on Line 109 of the decoder, you create a parser for int32.
It seems to indicate that the type can be shorter(from the pad=True parameter), however in the actual function it reads exactly 4 bytes(type_size) irrespective of the size passed in. This renders the pad option redundant.
My reading of the function implies line 53 should read new_offset = offset + size. Related to this it might also be wise to assert that if pad: assert size <= type_size.
The text was updated successfully, but these errors were encountered:
I think you may be right. A pull request would be welcomed. It would be nice to have a unit test for this. Re: the assert, we should throw an InvalidDatabaseError rather than an AssertionError in this case.
I'm reviewing your code for a personal project and on Line 109 of the decoder, you create a parser for
int32
.It seems to indicate that the type can be shorter(from the
pad=True
parameter), however in the actual function it reads exactly 4 bytes(type_size
) irrespective of thesize
passed in. This renders thepad
option redundant.My reading of the function implies line 53 should read
new_offset = offset + size
. Related to this it might also be wise to assert thatif pad: assert size <= type_size
.The text was updated successfully, but these errors were encountered: