Strlen in ReadInput() replaced with checking second to last char