diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-11-04 17:52:13 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-11-04 17:52:13 +0000 |
commit | cbd682468f4d32c48ac7144c09094bda80eb5b11 (patch) | |
tree | 032b919b30df829ca61e1c73e71fdf67c41a7a91 /games/bcd/bcd.c | |
parent | aa0f70905d7663ad28d8f954f64f9abaebfe1041 (diff) |
fix another signed char bug. while here, toupper() is now safe to call
on any char value.
Diffstat (limited to 'games/bcd/bcd.c')
-rw-r--r-- | games/bcd/bcd.c | 5 |
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(' '); |