Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cJSON.c
Original file line number Diff line number Diff line change
Expand Up @@ -2913,7 +2913,7 @@ static void minify_string(char **input, char **output) {
*input += static_strlen("\"");
*output += static_strlen("\"");
return;
} else if (((*input)[0] == '\\') && ((*input)[1] == '\"')) {
} else if (((*input)[0] == '\\') && ((*input)[1] != '\0')) {
(*output)[1] = (*input)[1];
*input += static_strlen("\"");
*output += static_strlen("\"");
Expand Down
6 changes: 5 additions & 1 deletion cJSON_Utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ static void decode_pointer_inplace(unsigned char *string)
}
else if (string[1] == '1')
{
decoded_string[1] = '/';
decoded_string[0] = '/';
}
else
{
Expand All @@ -384,6 +384,10 @@ static void decode_pointer_inplace(unsigned char *string)

string++;
}
else
{
decoded_string[0] = string[0];
}
}

decoded_string[0] = '\0';
Expand Down