diff --git a/cJSON.c b/cJSON.c index 87add2969f53c7311d0f6c2a3bd9b197d3b0c9e1_Y0pTT04uYw==..877aec816f6cc6b9c95dfc09c8df969d528ddcaa_Y0pTT04uYw== 100644 --- a/cJSON.c +++ b/cJSON.c @@ -871,7 +871,7 @@ escape_characters++; break; default: - if (*input_pointer < 32) + if (*input_pointer < '\x20') { /* UTF-16 escape sequence */ escape_characters += static_strlen("uXXXX"); @@ -903,7 +903,7 @@ /* copy the string */ for (input_pointer = input; *input_pointer != '\0'; (void)input_pointer++, output_pointer++) { - if ((*input_pointer > 31) && (*input_pointer != '\"') && (*input_pointer != '\\')) + if ((*input_pointer >= '\x20') && (*input_pointer != '\"') && (*input_pointer != '\\')) { /* normal character, copy */ *output_pointer = *input_pointer; @@ -971,7 +971,7 @@ return NULL; } - while (can_access_at_index(buffer, 0) && (buffer_at_offset(buffer)[0] <= 32)) + while (can_access_at_index(buffer, 0) && (buffer_at_offset(buffer)[0] <= '\x20')) { buffer->offset++; }