- Open a button in the button bar, preferably one that has the "Parameters" field filled out.
- Delete the current "Command" and type xc
- The "Parameters" and the "Start path" gets deleted and inactivated - just like if a cm_ or em_ command is chosen via the button with the magnifying glass.
- Type one more character - the "Parameters" and the "Start path" gets reactivated (but are still blank).
- It also happens if I paste xc from the Clipboard - so it is not the keystrokes xc that does it - it is the string xc.
[Solved] Peculiar bug when editing a button
Moderators: Hacker, petermad, Stefan2, white
[Solved] Peculiar bug when editing a button
This only affects the 64bit version of TC - but all the way back to TC 8.0 (x64)
Last edited by petermad on 2021-03-13, 03:29 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Peculiar bug when editing a button
Confirmed
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
Re: Peculiar bug when editing a button
Confirmed - only x64 version, 32 bit not affected.
Also: "xa" "xb" "xc" "xd" "xe" "xf" works the same way and you can add more a,b,c,d,e,f - "Parameters" and "Start path" still not active - you must add letter behind f to reactivate
Also: "xa" "xb" "xc" "xd" "xe" "xf" works the same way and you can add more a,b,c,d,e,f - "Parameters" and "Start path" still not active - you must add letter behind f to reactivate
-
- Power Member
- Posts: 872
- Joined: 2013-09-04, 14:07 UTC
Re: Peculiar bug when editing a button
Confirmed.
And it is not just "xc" or similar triggering this effect.
As it looks like, TC 64-bit tries to parse the command string as an integer number.
Seems the wrong input validation code has been wired up/reused incorrectly...
Any hex number of up to 16 digits (= 64-bit value) with a "x" prefix and an optional +/- sign triggers the effect.
Decimal integer numbers with an optional +/- sign will trigger the effect, as long as the value fits into 64 bits (as a signed 64-bit integer type, value range [-9223372036854775808, +9223372036854775807]).
Binary numbers with a "%" prefix are joining the fun as well (assuming they fit into 64-bit, i guess).
And octals. What would be a party without the octals? Just use the "&" prefix for octals, and there you go. (Again, 64-bit limit seems to apply).
Is there any common numeral system i forgot?
And it is not just "xc" or similar triggering this effect.
As it looks like, TC 64-bit tries to parse the command string as an integer number.
Seems the wrong input validation code has been wired up/reused incorrectly...
Any hex number of up to 16 digits (= 64-bit value) with a "x" prefix and an optional +/- sign triggers the effect.
Decimal integer numbers with an optional +/- sign will trigger the effect, as long as the value fits into 64 bits (as a signed 64-bit integer type, value range [-9223372036854775808, +9223372036854775807]).
Binary numbers with a "%" prefix are joining the fun as well (assuming they fit into 64-bit, i guess).
And octals. What would be a party without the octals? Just use the "&" prefix for octals, and there you go. (Again, 64-bit limit seems to apply).
Is there any common numeral system i forgot?

Re: Peculiar bug when editing a button
elgonzo,
Roman
Roman.Is there any common numeral system i forgot?
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
-
- Power Member
- Posts: 872
- Joined: 2013-09-04, 14:07 UTC
Re: Peculiar bug when editing a button
That makes sence, since you are allowed to enter the number of any cm_command ins stead of the command name, and that explains why the "Parameters" and "Start path" fields are disabled like when you enter and cm_command - actually as soon as you have entered cm_ or em_As it looks like, TC 64-bit tries to parse the command string as an integer number.
The best would be if TC only considered decimal numbers between 100 and 8999 as internal commands.
Last edited by petermad on 2020-09-05, 10:14 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
-
- Power Member
- Posts: 872
- Joined: 2013-09-04, 14:07 UTC
Re: Peculiar bug when editing a button
Your explanation made me check the 32-bit version again. Unsurprisingly, it exhibits a similar and closer to the intended but unfortunately undocumented behavior (or the documentation for this is well hidden). The 32-bit version only successfully parses decimal signed 32-bit integers. Neither hex, binary nor octal numbers are parsed (at least not with the prefixes x/%/&).
- ghisler(Author)
- Site Admin
- Posts: 50532
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Peculiar bug when editing a button
Interesting, I didn't know that the Lazarus val() command would recognize such strings as hexadecimal. Numeric values are indeed supported, and both the decimal and hexadecimal (with $ at the start) variations are allowed.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Peculiar bug when editing a button
Confirmed fixed in TC 10 b1ahistory.txt wrote:03.09.20 Fixed: Button bar: Hex strings in the form "xc" were detected as internal numeric commands by mistake (64)

License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar