diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-03-25 21:06:54 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-03-25 22:05:31 +0900 |
| commit | a5a6b51126875e578ef1834c8af06141934df7dd (patch) | |
| tree | c4ea44615f5b3ee1e9fdb3b9514bfe7e8200d712 /mrbgems/mruby-pack/src | |
| parent | 1e14afa4e4c73f268ee406a6de081cfdad635fa7 (diff) | |
| download | mruby-a5a6b51126875e578ef1834c8af06141934df7dd.tar.gz mruby-a5a6b51126875e578ef1834c8af06141934df7dd.zip | |
Use uppercase version of `ctype` macros e.g. `ISSPACE`; fix #4338
Diffstat (limited to 'mrbgems/mruby-pack/src')
| -rw-r--r-- | mrbgems/mruby-pack/src/pack.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mrbgems/mruby-pack/src/pack.c b/mrbgems/mruby-pack/src/pack.c index 2e68f35ed..ac29fdbf3 100644 --- a/mrbgems/mruby-pack/src/pack.c +++ b/mrbgems/mruby-pack/src/pack.c @@ -627,7 +627,7 @@ unpack_a(mrb_state *mrb, const void *src, int slen, mrb_value ary, long count, u } } else if (!(flags & PACK_FLAG_a)) { /* "A" */ - while (copylen > 0 && (sptr[copylen - 1] == '\0' || isspace(sptr[copylen - 1]))) { + while (copylen > 0 && (sptr[copylen - 1] == '\0' || ISSPACE(sptr[copylen - 1]))) { copylen--; } } @@ -1072,9 +1072,9 @@ alias: /* read suffix [0-9*_!<>] */ while (tmpl->idx < tlen) { ch = tptr[tmpl->idx++]; - if (isdigit(ch)) { + if (ISDIGIT(ch)) { count = ch - '0'; - while (tmpl->idx < tlen && isdigit(tptr[tmpl->idx])) { + while (tmpl->idx < tlen && ISDIGIT(tptr[tmpl->idx])) { count = count * 10 + (tptr[tmpl->idx++] - '0'); if (count < 0) { mrb_raise(mrb, E_RUNTIME_ERROR, "too big template length"); |
