file incorrectly displayed in file compare

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
MMx
Junior Member
Junior Member
Posts: 7
Joined: 2013-05-06, 13:03 UTC

file incorrectly displayed in file compare

Post by *MMx »

Here's what I did:
1. Create a file containing the character '1' 327687 times
2. Create an empty file
3. Compare those two
4. You see an empty file in one panel, the character '1' only 7 times on the other panel

Windows 7 64bit, TC 8.51a 64bit

Since 327687 is 0x50007 I'm guessing that a counter looped somewhere and the result is that only a prefix of basically random length of the line was displayed. Unfortunately the file compare functionality is outright dangerous for me to use because of this, since I'm using it to find out if an error was introduced somewhere between an input and an output file, and things like this just scream error. Is it possible at all to handle such situations more gracefully?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50550
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

There are some bugs in the DrawText and TextOut functions which cause this with very long strings. There is no error code, and no way to detect when it happens, sorry.

Just switch to binary compare mode.
Author of Total Commander
https://www.ghisler.com
MMx
Junior Member
Junior Member
Posts: 7
Joined: 2013-05-06, 13:03 UTC

Post by *MMx »

Viewing the file is not the problem, I can view it in the viewer. Switching to binary changes the way files are compared, not just displayed. Would it be possible to limit string length to 0x50000 and append something like <snip> in bold to the end?
Post Reply