Skip to content

Possible bug in ATX image handling code #17

@ksuszka

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);

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