Skip to content

Possible bug in ATX image handling code #17

Description

@ksuszka

I was skimming through code and caught something which may be a bug.
In line

fileIndex = file->read() + file->read() * 256 + file->read() * 512 + file->read() * 768;
(and in 3 additional places down the file) there is a 32 bit number decoded from four bytes, I think it sould be change into something like:

fileIndex = file->read() + file->read() * 256 + file->read() * 256*256 + file->read() * 256*256*256;

or

fileIndex = file->read() + file->read() * (1 << 8) + file->read() * (1 << 16) + file->read() * (1 << 24);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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