From 8a849bc85a1d59ffc77e6bff1aa3da2d4bcd746c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Fri, 11 Sep 2020 19:27:56 +0200 Subject: Call character checking function with unsigned char See https://wiki.sei.cmu.edu/confluence/display/c/STR37-C.+Arguments+to+character-handling+functions+must+be+representable+as+an+unsigned+char --- MainPanel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MainPanel.c') diff --git a/MainPanel.c b/MainPanel.c index eb7e663d..4390dad6 100644 --- a/MainPanel.c +++ b/MainPanel.c @@ -79,7 +79,7 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int 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)) { + } else if (0 < ch && ch < 255 && isdigit((unsigned char)ch)) { MainPanel_pidSearch(this, ch); } else { if (ch != ERR) { -- cgit v1.2.3