Commit 70cd5c2b authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Check range when accessing keys table.

Should fix #321.
parent c8cadfb9
......@@ -91,7 +91,7 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) {
result = HANDLED;
} else if (ch == 27) {
return HANDLED;
} else if (ch != ERR && this->keys[ch]) {
} else if (ch != ERR && ch > 0 && ch < KEY_MAX && this->keys[ch]) {
reaction |= (this->keys[ch])(this->state);
result = HANDLED;
} else if (isdigit(ch)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment