ignore keycodes <10 || >10 && <32 in Window::GetString()

master
Andrzej Rybczak 17 years ago
parent cf3746f301
commit bf71a01b1c
  1. 4
      src/window.cpp

@ -423,6 +423,10 @@ string Window::GetString(const string &base, size_t length, size_t width, bool e
prefresh(itsWindow, 0, 0, itsStartY, itsStartX, itsStartY+itsHeight-1, itsStartX+itsWidth-1);
input = wgetch(itsWindow);
// these key codes are special and should be ignored
if (input < 10 || (input > 10 && input < 32))
continue;
switch (input)
{
case ERR:

Loading…
Cancel
Save