summaryrefslogtreecommitdiff
path: root/ext/json/generator/generator.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/json/generator/generator.c')
-rw-r--r--ext/json/generator/generator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c
index 42a1658..7bc1934 100644
--- a/ext/json/generator/generator.c
+++ b/ext/json/generator/generator.c
@@ -894,8 +894,8 @@ static int isArrayOrObject(VALUE string)
long string_len = RSTRING_LEN(string);
char *p = RSTRING_PTR(string), *q = p + string_len - 1;
if (string_len < 2) return 0;
- for (; p < q && isspace(*p); p++);
- for (; q > p && isspace(*q); q--);
+ for (; p < q && isspace((unsigned char)*p); p++);
+ for (; q > p && isspace((unsigned char)*q); q--);
return (*p == '[' && *q == ']') || (*p == '{' && *q == '}');
}