Why:
c++ is explict, and c++ logic states that zero is false, anything else is true.
your original logic breaks down to...
if (input == "cmds) or
("CMDS" != 0)
"CMDS" does not == 0. Therefore it is true.
with the root cause of not being explicit (you didn't ask for input == "CMDS", you gave a human readable but compiler confusing and unfortunately legal totally different condition).