зеркало из https://github.com/github/ruby.git
* ext/json/generator/generator.c (isArrayOrObject): cast char to
unsigned char. [Bug #8378] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
279c7bdd88
Коммит
ce573f3166
|
@ -1,3 +1,8 @@
|
|||
Wed May 8 13:49:38 2013 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* ext/json/generator/generator.c (isArrayOrObject): cast char to
|
||||
unsigned char. [Bug #8378]
|
||||
|
||||
Wed May 8 13:46:10 2013 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* ext/json/generator/depend: fix dependencies [Bug #8379]
|
||||
|
|
|
@ -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 == '}');
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче