Command parameters truncated when containing '&' charact

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

Moderators: white, Hacker, petermad, Stefan2

PascalT
Junior Member
Junior Member
Posts: 26
Joined: 2015-08-27, 08:00 UTC

Post by *PascalT »

MVV

I know %T%N is already quoted when there are spaces.

I think Christian meant to quote %P%N if they contain special characters whether or not there are spaces.
I was just asking for the same for %T%N
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

milo1012,
Don't understand why do you use logarithmic scanning of your lut_chars when linear one would do the same thing faster (and much faster in case of long strings).

PascalT,
I think he will use same quoting rules for all places.
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

MVV wrote:why do you use logarithmic scanning of your lut_chars when linear one would do the same thing faster (and much faster in case of long strings)
First of all it's just a quick example, you're free to optimize it.
And: this is the setup, we'd only call it once!
That's the whole point of LUT.

The check() function is the main point I'm talking about: no need for four bit operations for every char,
plus no need for memset.
A few hundred bytes for a static struct is a fair tradeof for a faster lookup operation, and far more readable and adaptable IMO.
(just replace a bool with a wchar and you get replacement function, etc.)
TC plugins: PCREsearch and RegXtract
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

The check() function is the main point I'm talking about: no need for four bit operations for every char,
plus no need for memset.
In my example memset is only needed for creating table, not for checking path.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

In Total Commander 8.52a RC1, I'm now also adding double quotes when the path or name contains the & character. Can you test it please?
Author of Total Commander
https://www.ghisler.com
PascalT
Junior Member
Junior Member
Posts: 26
Joined: 2015-08-27, 08:00 UTC

Post by *PascalT »

It's OK for me in 8.52a RC1.
Thank you.
Post Reply