mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Not sure if this should be considered a bug just because it doesn't behave the same way $replace() does.

If /breplace is given an odd count of numbers greater than 2, it doesn't report the same error as when /breplace is given just 1 number.

i.e. error vs no-error for 5 replacement tokens:

Code:
//echo -a $replace(string,a,b,c,d,e)
vs
//bset &a 1 13 10 13 10 99 | breplace &a 10 13 13 10 99 | echo -a $bvar(&a,1-)

Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
Thanks for your bug report. Yes, I can confirm that $breplace() just ignores the last odd character. As it has always behaved this way, changing it now could break scripts, so I would rather leave it the way it is.


Link Copied to Clipboard