diff options
author | Omar Polo <op@omarpolo.com> | 2022-11-17 09:21:38 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2022-11-17 09:21:38 +0000 |
commit | 6130e0eeac9db4fa8e6fe5934ec2d0ab202f979e (patch) | |
tree | 1aff25c6cc404219c7f8f5e29f05da7e8caab24d /gg.c | |
parent | 71cac3a08bf84e8b9f8d52999df34913ef4efc55 (diff) |
always cast is*() arguments to unsigned char
Diffstat (limited to 'gg.c')
-rw-r--r-- | gg.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -248,7 +248,9 @@ get(const char *r) if (memmem(buf, len, "\r\n", 2) == NULL) errx(1, "invalid reply: no \\r\\n"); - if (!isdigit(buf[0]) || !isdigit(buf[1]) || buf[2] != ' ') + if (!isdigit((unsigned char)buf[0]) || + !isdigit((unsigned char)buf[1]) || + buf[2] != ' ') errx(1, "invalid reply: invalid response format"); code = (buf[0] - '0') * 10 + buf[1] - '0'; |