mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
reformatting: cJSONUtils_InplaceDecodePointerString
This commit is contained in:
parent
5713edb710
commit
a21a124d40
@ -193,8 +193,16 @@ cJSON *cJSONUtils_GetPointer(cJSON *object, const char *pointer)
|
||||
static void cJSONUtils_InplaceDecodePointerString(char *string)
|
||||
{
|
||||
char *s2 = string;
|
||||
for (;*string;s2++,string++) *s2=(*string!='~')?(*string):((*(++string)=='0')?'~':'/');
|
||||
*s2=0;
|
||||
for (; *string; s2++, string++)
|
||||
{
|
||||
*s2 = (*string != '~')
|
||||
? (*string)
|
||||
: ((*(++string) == '0')
|
||||
? '~'
|
||||
: '/');
|
||||
}
|
||||
|
||||
*s2 = '\0';
|
||||
}
|
||||
|
||||
static cJSON *cJSONUtils_PatchDetach(cJSON *object,const char *path)
|
||||
|
Loading…
Reference in New Issue
Block a user