Skip to content

Commit

Permalink
Merge pull request #3243 from purecloudlabs/hotfix/json-array-del-ele…
Browse files Browse the repository at this point in the history
…ment

json: fix array element deletion
(cherry picked from commit 6ec8840)
  • Loading branch information
razvancrainea committed Nov 13, 2023
1 parent d5eebb4 commit cd1c28a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/json/array_del.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
void json_object_array_del(struct json_object* obj, int idx)
{
#if JSON_C_VERSION_NUM >= JSON_C_VERSION_013
array_list_del_idx(json_object_get_array(obj), idx,
json_object_get_array(obj)->length);
array_list_del_idx(json_object_get_array(obj), idx, 1);
#else
if(idx >= obj->o.c_array->length)
return;
Expand Down

0 comments on commit cd1c28a

Please sign in to comment.