From cbd682468f4d32c48ac7144c09094bda80eb5b11 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Tue, 4 Nov 2014 17:52:13 +0000 Subject: fix another signed char bug. while here, toupper() is now safe to call on any char value. --- games/bcd/bcd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'games/bcd') diff --git a/games/bcd/bcd.c b/games/bcd/bcd.c index 0e9afa6edb9..a69d7c45360 100644 --- a/games/bcd/bcd.c +++ b/games/bcd/bcd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcd.c,v 1.14 2014/11/04 17:50:23 tedu Exp $ */ +/* $OpenBSD: bcd.c,v 1.15 2014/11/04 17:52:12 tedu Exp $ */ /* $NetBSD: bcd.c,v 1.6 1995/04/24 12:22:23 cgd Exp $ */ /* @@ -155,8 +155,7 @@ printcard(char *str, size_t len) /* make string upper case. */ for (p = str; p < end; ++p) - if (isascii(*p) && islower(*p)) - *p = toupper(*p); + *p = toupper((unsigned char)*p); /* top of card */ putchar(' '); -- cgit v1.2.3