Garbled lines in wincmd.ini [Buttonbar]

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Zerryk
Junior Member
Junior Member
Posts: 12
Joined: 2003-02-06, 20:30 UTC
Location: Prague

Garbled lines in wincmd.ini [Buttonbar]

Post by *Zerryk »

9.20 b2 64bit, Windows 10 1803 CZ
HKCU\Software\Ghisler\Total Commander:
InstallDir=C:\Program Files\totalcmd
IniFileName=%APPDATA%\GHISLER\wincmd.ini

I just added a button onto the button bar. In wincmd.ini, the following text appeared:

[Buttonbar]
Buttonheight=29
FlatIcons=1
SmallIcons=1
SmallIconSize=16
XPstyle=1
Buttonheight96UUUUUUQ=29
SmallIconSize96UUUUUUQ=16
DefaultDpi=96UUUUUUQ

The three latest lines are seemingly wrong, there are also some unprintable characters in these. And new such garbled lines are added with each subsequent change in the buttonbar.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

That's, it's a bug in Lazarus "str" function converting numbers to text. I will use my workaround function.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Looks like str simply doesn't null-terminate strings because Lazarus internally doesn't require it.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, that's indeed the problem - Delphi doesn't have this bug.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This should be fixed in beta 3, please test it!
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Since there has been no reply for the last 2 weeks, I will assume that this has been fixed. I will move the thread to the fixed bugs forum soon.
Author of Total Commander
https://www.ghisler.com
Post Reply