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 --- CategoriesPanel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CategoriesPanel.c') diff --git a/CategoriesPanel.c b/CategoriesPanel.c index 8a1e16df..c12b3905 100644 --- a/CategoriesPanel.c +++ b/CategoriesPanel.c @@ -81,7 +81,7 @@ static HandlerResult CategoriesPanel_eventHandler(Panel* super, int ch) { break; } default: - if (ch < 255 && isalpha(ch)) + if (0 < ch && ch < 255 && isalpha((unsigned char)ch)) result = Panel_selectByTyping(super, ch); if (result == BREAK_LOOP) result = IGNORED; -- cgit v1.2.3