ImHex icon indicating copy to clipboard operation
ImHex copied to clipboard

[Bug] Opening a blank file will change it

Open metablaster opened this issue 1 year ago • 0 comments

Operating System

Windows

What's the issue you encountered?

Opening a blank file with ImHex will change it by simply opening it and closing it without doing anything to file.

How can the issue be reproduced?

I've attached a test file that is blank, use it to reproduce the issue.

  1. Add the file to your git source tree to be able to see the effect of a change
  2. Add the test file to index with git ex. git add blank.asm
  3. Run ImHex, select File -> Open and open the file and then close it with ImHex with File -> Close
  4. Run git status and you'll see the file is reported as modified even though you did nothing to file.

blank.zip

ImHex Version

1.26.2

ImHex Build Type

  • [ ] Nightly or built from sources

Installation type

Downloaded and installed from releases on GitHub

Additional context?

I see there is a 0x00 byte in test file, a NUL ASCII character, but how did that byte come there I don't know.

metablaster avatar Jan 25 '23 19:01 metablaster