Skip to content

Clarification around parsing int32 from files #30

Closed
@software-opal

Description

@software-opal

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions