mIRC Home    About    Download    Register    News    Help

Print Thread
#272576 14/04/24 06:12 PM
Joined: Nov 2021
Posts: 19
F
Pikka bird
OP Offline
Pikka bird
F
Joined: Nov 2021
Posts: 19
Test it with the alias below:

alias midBug {
var %r, %limit 10000, %t $+(<z>TE,$str(b,%limit),ST</z>), %lg $len(%t)
echo -s ECHO MID [FAIL]: %lg
%r = $mid(%t,4,%lg)
echo -s %r
echo -s ECHO LEFT RIGHT [OK]: %lg
%r = $right(%t,$calc(%lg - 3))
%r = $left(%r,$calc(%lg - 7))
echo -s %r
}

Look at the test, when trying to search between tags with $mid, it fails the result. With $right and $left it works. The extra limit was placed on $mid to show that it still does not give the expected result.

$maxlenl gives a limit of 10240, but $mid does not work with anything close to the maximum limit.

Joined: Dec 2002
Posts: 5,425
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,425
Thanks, it looks like $mid() had an internal maximum limit of 10000 vs the 10240 that $maxlenl returns. This issue has been fixed for the next version.


Link Copied to Clipboard