diff options
author | 2013-11-20 21:33:54 +0000 | |
---|---|---|
committer | 2013-11-20 21:33:54 +0000 | |
commit | 586047aaf6a4c16f81e7c073fe7e14f4701628ae (patch) | |
tree | e80dee6a474796092c38654c4cf03a925f6e002e | |
parent | unsigned char casts are needed for these isdigit & isprint calls (diff) | |
download | wireguard-openbsd-586047aaf6a4c16f81e7c073fe7e14f4701628ae.tar.xz wireguard-openbsd-586047aaf6a4c16f81e7c073fe7e14f4701628ae.zip |
unsigned char casts for ctype.h macros, when dealing with the
yytext buffer
ok benno
-rw-r--r-- | usr.bin/bc/bc.y | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/bc/bc.y b/usr.bin/bc/bc.y index f9b80bc5b97..55c48fcfceb 100644 --- a/usr.bin/bc/bc.y +++ b/usr.bin/bc/bc.y @@ -1,5 +1,5 @@ %{ -/* $OpenBSD: bc.y,v 1.43 2013/11/12 13:54:51 deraadt Exp $ */ +/* $OpenBSD: bc.y,v 1.44 2013/11/20 21:33:54 deraadt Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek <otto@drijf.net> @@ -947,7 +947,8 @@ yyerror(char *s) n = asprintf(&str, "%s: %s:%d: %s: newline unexpected", __progname, filename, lineno, s); - else if (isspace(yytext[0]) || !isprint(yytext[0])) + else if (isspace((unsigned char)yytext[0]) || + !isprint((unsigned char)yytext[0])) n = asprintf(&str, "%s: %s:%d: %s: ascii char 0x%02x unexpected", __progname, filename, lineno, s, yytext[0]); |