summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-11-04 17:52:12 +0000
committertedu <tedu@openbsd.org>2014-11-04 17:52:12 +0000
commit1a508dba007e60abd5c906272c43e6e121464eb0 (patch)
tree2dead61d374067bc473cb18c664bb74ff0b75e14
parentallow printing longer lines than fit on a card by spilling onto more cards. (diff)
downloadwireguard-openbsd-1a508dba007e60abd5c906272c43e6e121464eb0.tar.xz
wireguard-openbsd-1a508dba007e60abd5c906272c43e6e121464eb0.zip
fix another signed char bug. while here, toupper() is now safe to call
on any char value.
-rw-r--r--games/bcd/bcd.c5
1 files changed, 2 insertions, 3 deletions
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(' ');