about summary refs log tree commit diff
path: root/lr.c
diff options
context:
space:
mode:
Diffstat (limited to 'lr.c')
-rw-r--r--lr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lr.c b/lr.c
index 99b6a22..bac781f 100644
--- a/lr.c
+++ b/lr.c
@@ -183,7 +183,7 @@ mkexpr(enum op op)
 static void
 ws()
 {
-	while (isspace(*pos))
+	while (isspace((unsigned char) *pos))
 		pos++;
 }
 
@@ -202,12 +202,12 @@ token(const char *token)
 static int64_t
 parse_num(int64_t *r)
 {
-	if (isdigit(*pos)) {
+	if (isdigit((unsigned char) *pos)) {
 		int64_t n;
 
-		for (n = 0; isdigit(*pos) && n <= INT64_MAX / 10 - 10; pos++)
+		for (n = 0; isdigit((unsigned char) *pos) && n <= INT64_MAX / 10 - 10; pos++)
 			n = 10 * n + (*pos - '0');
-		if (isdigit(*pos))
+		if (isdigit((unsigned char) *pos))
 			parse_error("number too big");
 		if (token("c"))      ;
 		else if (token("b")) n *= 512LL;