Nasty filter bug
Neville Smythe
neville.smythe at optusnet.com.au
Tue Jan 23 21:01:29 EST 2024
Try this in the msg box:
put "aaa[bbb" into tStr; put line 1 of tStr into tLine; filter tStr without tLine; put tStr
I get (using MacOS, LC 9.6.11)
aaa[bbb
That is to say, the line is not filtered out.
And:
put "aaa[bbb" into tStr; filter tStr with tStr; put tStr
produces an empty string instead of the original string.
The bug occurs if the line contains the character “[“ anywhere; any lines containing that character are ignored by both filter with and filter without.
This is really serious, because I rely on the filter command a lot, as I would think do many other developers!
Don’t know if it occurs with other characters, but I have never seen it before. I discovered it when filtering lines with regular expressions. Other special regexp characters I have tested do not trigger the bug.
Neville Smythe
More information about the use-livecode
mailing list