aboutsummaryrefslogtreecommitdiff
path: root/gg.c
diff options
context:
space:
mode:
Diffstat (limited to 'gg.c')
-rw-r--r--gg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gg.c b/gg.c
index 35ccc29..e650737 100644
--- a/gg.c
+++ b/gg.c
@@ -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';