Skip to content

Ranges seem to be incorrect #31

@alexklaeser

Description

@alexklaeser

While applying the klvdata module to some test data, I came across an Value error originating here:

raise ValueError

After a while I realized that the min/max values for 16bit integer where implemented in the code as -32767/32767, however, they should be -32768/32767. In my case an entry had the value -32768 and thus caused an error during parsing.

If I am correct, the following line (and alike) should be modified:

_domain = (-(2**15-1), 2**15-1)

... instead it should look like:
_domain = ((-2**15 - 1), 2**15 - 1)

After adjusting all of these occurrences in the file, the parsing of my files was successful.

best regards
Alex

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions