Skip to content

Commit 10887dd

Browse files
razvancraineabenceszigeti
authored andcommitted
Merge pull request OpenSIPS#3243 from purecloudlabs/hotfix/json-array-del-element
json: fix array element deletion (cherry picked from commit 6ec8840)
1 parent 09627ad commit 10887dd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

modules/json/array_del.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
void json_object_array_del(struct json_object* obj, int idx)
3232
{
3333
#if JSON_C_VERSION_NUM >= JSON_C_VERSION_013
34-
array_list_del_idx(json_object_get_array(obj), idx,
35-
json_object_get_array(obj)->length);
34+
array_list_del_idx(json_object_get_array(obj), idx, 1);
3635
#else
3736
if(idx >= obj->o.c_array->length)
3837
return;

0 commit comments

Comments
 (0)