System/Libraries/Json: Set arr->last_item to NULL if arr->length is zero
This commit is contained in:
parent
fd8d6ca2b7
commit
8ef544d912
1 changed files with 2 additions and 0 deletions
|
@ -1254,6 +1254,8 @@ U0 @json_remove_item(@json_array* arr, I64 index)
|
|||
if (next_item)
|
||||
next_item->prev = prev_item;
|
||||
@json_remove_item_final : --arr->length;
|
||||
if (!arr->length)
|
||||
arr->last_item = NULL;
|
||||
}
|
||||
|
||||
U64 @json_callable_array_index_wrapper_function(I64 index, Bool return_item = FALSE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue