fix an endless loop waiting for y/n when the input is at EOF

reported by Calin Andrian
  Subject: [Ngspice-devel] Invaild number bug