Do not trust isalpha(c) for values > 255.

Fixes #174.
This commit is contained in:
Hisham Muhammad
2015-03-22 22:56:28 -03:00
parent 1e0c530a46
commit 442a0d33e4
7 changed files with 7 additions and 7 deletions

View File

@ -427,7 +427,7 @@ HandlerResult Panel_selectByTyping(Panel* this, int ch) {
if (!this->eventHandlerBuffer)
this->eventHandlerBuffer = calloc(100, 1);
if (isalnum(ch)) {
if (ch < 255 && isalnum(ch)) {
int len = strlen(this->eventHandlerBuffer);
if (len < 99) {
this->eventHandlerBuffer[len] = ch;