fix EOF case in `inputEqual`