1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

fix another signed char bug. while here, toupper() is now safe to call

on any char value.
This commit is contained in:
tedu 2014-11-04 17:52:12 +00:00
parent 50d1b26a76
commit 1a508dba00

View File

@ -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(' ');