mirror of
https://github.com/taurusxin/ncmdump.git
synced 2025-09-14 13:56:49 +08:00
Compare commits
2 Commits
3fe1518325
...
80a607a8fb
Author | SHA1 | Date | |
---|---|---|---|
![]() |
80a607a8fb | ||
![]() |
6c125d6152 |
@ -2142,7 +2142,7 @@ CJSON_PUBLIC(void) cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newit
|
||||
{
|
||||
cJSON *after_inserted = NULL;
|
||||
|
||||
if (which < 0)
|
||||
if (which < 0 || newitem == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -2154,6 +2154,10 @@ CJSON_PUBLIC(void) cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newit
|
||||
return;
|
||||
}
|
||||
|
||||
if (after_inserted != array->child && newitem->prev == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
newitem->next = after_inserted;
|
||||
newitem->prev = after_inserted->prev;
|
||||
after_inserted->prev = newitem;
|
||||
|
Loading…
Reference in New Issue
Block a user