Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OpenSIPS incorrectly calls the JSON-C array element deletion function by passing the size of the array instead of the desired count of elements to delete. When attempting to delete from index `0`, it results in the deletion of all elements, while specifying an index greater than `0` leads to no deletion due to overindexing. ### Example 1: ``` $json(obj) := "[ 1, 2, 3 ]"; $json(obj[0]) = NULL; xlog("$json(obj)\n"); ``` Result: `[]` Expected: `[ 2, 3 ]` ### Example 2: ``` $json(obj) := "[ 1, 2, 3 ]"; $json(obj[1]) = NULL; xlog("$json(obj)\n"); ``` Result: `[ 1, 2, 3 ]` Expected: `[ 1, 3 ]`
- Loading branch information