Never mind again! One of these days I'll catch a real bug.

Click to reveal.. (Old post)

I think I'm not imagining it this time.

The script below should go back and forth between unset and inc, but every second time you run the script, it repeats "unset" twice. Tested it on mIRC 7.43-7.46 and even asked a friend to try it, who got the same result.

A few things I tried:
  • "var %x = 15,%o 1" OR "var %x = 15,%o = 1" "var %x = 15,%o $true" OR ""var %x = 15,%o = $true"
    Result seems to vary. Sometimes it gets stuck and gives you unset twice, and sometimes it works like it should. It seems to change the state when you switch do one or more runs with "1" or "$false".
  • "var %x = 15,%o" OR ""var %x = 15,%o 0" OR "var %x = 15,%o = 0" OR "var %x = 15,%o $false" OR "var %x = 15,%o = $false"
    Gives you unset twice in a row every other run.
  • "unset %o" at the start
    Works like it should every single time.
  • "unset %o" twice in the loop
    Works like it should every single time.
Code:
alias unsetinctest {
  var %x = 15,%o
  echo -at * $str(-,10)
  while (%x) {
    if (%o) {
      unset %o
      echo -at * unset
    }
    else {
      %o = 1
      echo -at * inc
    }
    dec %x
  }
}


Last edited by Dazuz; 04/08/16 09:21 PM.