From 057b7905c4df8aa05eca77ab5ca5f166b00d9b09 Mon Sep 17 00:00:00 2001 From: mmcc Date: Sat, 24 Oct 2015 17:13:27 +0000 Subject: [PATCH] Cast ctype functions' arguments to unsigned char. ok guenther@ --- games/arithmetic/arithmetic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/games/arithmetic/arithmetic.c b/games/arithmetic/arithmetic.c index bd2bfd5ce6c..fce5bcac5e2 100644 --- a/games/arithmetic/arithmetic.c +++ b/games/arithmetic/arithmetic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arithmetic.c,v 1.20 2015/10/10 22:32:55 doug Exp $ */ +/* $OpenBSD: arithmetic.c,v 1.21 2015/10/24 17:13:27 mmcc Exp $ */ /* * Copyright (c) 1989, 1993 @@ -222,8 +222,8 @@ retry: (void)printf("\n"); return(EOF); } - for (p = line; isspace(*p); ++p); - if (!isdigit(*p)) { + for (p = line; isspace((unsigned char)*p); ++p); + if (!isdigit((unsigned char)*p)) { (void)printf("Please type a number.\n"); continue; } -- 2.20.1