mirror of
https://git.checksum.fail/alec/slon.git
synced 2025-12-08 12:09:55 +02:00
System/Libraries/Json: Set arr->last_item to NULL if arr->length is zero
This commit is contained in:
@@ -1254,6 +1254,8 @@ U0 @json_remove_item(@json_array* arr, I64 index)
|
|||||||
if (next_item)
|
if (next_item)
|
||||||
next_item->prev = prev_item;
|
next_item->prev = prev_item;
|
||||||
@json_remove_item_final : --arr->length;
|
@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)
|
U64 @json_callable_array_index_wrapper_function(I64 index, Bool return_item = FALSE)
|
||||||
|
|||||||
Reference in New Issue
Block a user