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

This commit is contained in:
Andrzej Rybczak
2009-03-22 15:14:12 +01:00
parent cf3746f301
commit bf71a01b1c

View File

@@ -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); prefresh(itsWindow, 0, 0, itsStartY, itsStartX, itsStartY+itsHeight-1, itsStartX+itsWidth-1);
input = wgetch(itsWindow); input = wgetch(itsWindow);
// these key codes are special and should be ignored
if (input < 10 || (input > 10 && input < 32))
continue;
switch (input) switch (input)
{ {
case ERR: case ERR: