mIRC Home    About    Download    Register    News    Help

Print Thread
#86562 12/06/04 05:54 AM
Joined: Mar 2004
Posts: 36
N
Nodren Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Mar 2004
Posts: 36
I noticed(i didnt find it, Kamek did actually, but noones posted it, so i figured i might as well) a bug in the /continue alias, this happens in 6.15, but doesnt happen in previous versions.

allow me to explain.... this alias here:
Code:
 
alias xyz {
  var %i = 2
  while (%i > 0) {
    echo beginning A; i = %i
    if (%i == 1) {
      echo setting i to 0, j to $true and restarting A...
      %i = 0
      %j = $true
      continue
    }
    var %j = $true
    while (%j) {
      echo beginning B
      var %j
    }
    echo end of A
    dec %i
  }
  echo end of alias; i = %i
} 


returns this on 6.03-6.14:
Code:
 
beginning A; i = 2
beginning B
end of A
beginning A; i = 1
setting i to 0, j to $true and restarting A...
end of alias; i = 0
 


and this on 6.15:
Code:
 
beginning A; i = 2
beginning B
end of A
beginning A; i = 1
setting i to 0, j to $true and restarting A...
beginning B
end of A
end of alias; i = -1
 


the problem lies in continue, because if continue is replaced with goto(and the marker at the begning of the while loop) then it will return as versions 6.03-6.14 do(could be more, but those were tested :P

so thats the bug.....i didnt write or do any of the testing, im just posting it, all this was discovered and written by Kamek.

#86563 12/06/04 06:21 AM
Joined: Dec 2002
Posts: 191
N
Vogon poet
Offline
Vogon poet
N
Joined: Dec 2002
Posts: 191


Link Copied to Clipboard