修复JSON删除元素BUG
This commit is contained in:
parent
5e859cd6ca
commit
98cdfe6402
|
@ -559,8 +559,16 @@ namespace gb
|
||||||
|
|
||||||
if(ele)
|
if(ele)
|
||||||
{
|
{
|
||||||
if(addr)
|
//if(addr)
|
||||||
*addr = NULL;
|
// *addr = ele->next;
|
||||||
|
if (cur_child_ == ele)
|
||||||
|
cur_child_ = ele->prev;
|
||||||
|
if (ele->prev)
|
||||||
|
ele->prev->next = ele->next;
|
||||||
|
if (ele->next)
|
||||||
|
ele->next->prev = ele->prev;
|
||||||
|
ele->prev = NULL;
|
||||||
|
ele->next = NULL;
|
||||||
cJSON_Delete(ele);
|
cJSON_Delete(ele);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue