mirror of
https://github.com/json-c/json-c.git
synced 2026-04-11 16:29:06 +08:00
Fix code formatting
This commit is contained in:
@@ -874,13 +874,10 @@ struct json_object *json_tokener_parse_ex(struct json_tokener *tok, const char *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while (c &&
|
while (c && ((c >= '0' && c <= '9') ||
|
||||||
((c >= '0' && c <= '9') ||
|
|
||||||
(!is_exponent && (c == 'e' || c == 'E')) ||
|
(!is_exponent && (c == 'e' || c == 'E')) ||
|
||||||
(neg_sign_ok && c=='-') ||
|
(neg_sign_ok && c == '-') || (pos_sign_ok && c == '+') ||
|
||||||
(pos_sign_ok && c=='+') ||
|
(!tok->is_double && c == '.')))
|
||||||
(!tok->is_double && c=='.')
|
|
||||||
))
|
|
||||||
{
|
{
|
||||||
pos_sign_ok = neg_sign_ok = 0;
|
pos_sign_ok = neg_sign_ok = 0;
|
||||||
++case_len;
|
++case_len;
|
||||||
@@ -922,10 +919,8 @@ struct json_object *json_tokener_parse_ex(struct json_tokener *tok, const char *
|
|||||||
because c can be part of a new object to parse on the
|
because c can be part of a new object to parse on the
|
||||||
next call to json_tokener_parse().
|
next call to json_tokener_parse().
|
||||||
*/
|
*/
|
||||||
if (tok->depth > 0 &&
|
if (tok->depth > 0 && c != ',' && c != ']' && c != '}' && c != '/' &&
|
||||||
c != ',' && c != ']' && c != '}' && c != '/' &&
|
c != 'I' && c != 'i' && !isspace((unsigned char)c))
|
||||||
c != 'I' && c != 'i' &&
|
|
||||||
!isspace((unsigned char)c))
|
|
||||||
{
|
{
|
||||||
tok->err = json_tokener_error_parse_number;
|
tok->err = json_tokener_error_parse_number;
|
||||||
goto out;
|
goto out;
|
||||||
|
|||||||
Reference in New Issue
Block a user