Yeah, you are probably right. But in that case the code should be checking for and rejecting any characters other than "1" and "0".
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.