ctype sign fixes (Tom Miller)

This commit is contained in:
rsc 2005-10-31 16:42:32 +00:00
parent b330c942b4
commit 74374cc8a4
10 changed files with 22 additions and 17 deletions

View file

@ -5,6 +5,7 @@
* input routines, escape function calling
*/
#include <u.h>
#include "tdef.h"
#include "fns.h"
#include "ext.h"
@ -1091,10 +1092,10 @@ void getpn(char *a)
continue;
default:
n = 0;
if (isdigit(*a)) {
if (isdigit((uchar)*a)) {
do
n = 10 * n + *a++ - '0';
while (isdigit(*a));
while (isdigit((uchar)*a));
a--;
} else
n = 9999;