This should be `ch <= '9'`, yes?