mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
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
This commit is contained in:

committed by
cgzones

parent
1f5bd5c4c8
commit
8a849bc85a
2
Panel.c
2
Panel.c
@ -411,7 +411,7 @@ HandlerResult Panel_selectByTyping(Panel* this, int ch) {
|
||||
this->eventHandlerState = xCalloc(100, sizeof(char));
|
||||
char* buffer = this->eventHandlerState;
|
||||
|
||||
if (ch > 0 && ch < 255 && isalnum(ch)) {
|
||||
if (0 < ch && ch < 255 && isalnum((unsigned char)ch)) {
|
||||
int len = strlen(buffer);
|
||||
if (len < 99) {
|
||||
buffer[len] = ch;
|
||||
|
Reference in New Issue
Block a user