Use uppercase version of ctype macros e.g. ISSPACE; fix #4338

This commit is contained in:
Yukihiro "Matz" Matsumoto
2019-03-25 21:06:54 +09:00
parent 1e14afa4e4
commit a5a6b51126
4 changed files with 23 additions and 23 deletions
+3 -3
View File
@@ -2844,7 +2844,7 @@ mrb_float_read(const char *string, char **endPtr)
*/
p = string;
while (isspace(*p)) {
while (ISSPACE(*p)) {
p += 1;
}
if (*p == '-') {
@@ -2867,7 +2867,7 @@ mrb_float_read(const char *string, char **endPtr)
for (mantSize = 0; ; mantSize += 1)
{
c = *p;
if (!isdigit(c)) {
if (!ISDIGIT(c)) {
if ((c != '.') || (decPt >= 0)) {
break;
}
@@ -2952,7 +2952,7 @@ mrb_float_read(const char *string, char **endPtr)
}
expSign = FALSE;
}
while (isdigit(*p)) {
while (ISDIGIT(*p)) {
exp = exp * 10 + (*p - '0');
if (exp > 19999) {
exp = 19999;