mirror of
https://github.com/DaveGamble/cJSON.git
synced 2024-12-27 13:58:19 +08:00
Utils: InplaceDecodePointerString: Check for NULL
This commit is contained in:
parent
c49ffbfba8
commit
a2309a509d
@ -208,6 +208,11 @@ cJSON *cJSONUtils_GetPointer(cJSON *object, const char *pointer)
|
||||
static void cJSONUtils_InplaceDecodePointerString(char *string)
|
||||
{
|
||||
char *s2 = string;
|
||||
|
||||
if (string == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (; *string; s2++, string++)
|
||||
{
|
||||
*s2 = (*string != '~')
|
||||
|
Loading…
x
Reference in New Issue
Block a user