You are correct nomad9.
0 == FALSE
1 or any number == TRUE
So the if() was comparing
TRUE == "h"
which means TRUE==TRUE
The other case
FALSE == TRUE
So it's no bug just bad logic.
If you want to put a string into a variable always use quotes.
HalfaBee