--- a/src/json.c Tue Dec 16 11:48:52 2025 +0100 +++ b/src/json.c Tue Dec 16 12:07:01 2025 +0100 @@ -506,7 +506,7 @@ if (json->vbuf.size >= json->vbuf.capacity) { int alloc_error; if (json->vbuf.data == json->vbuf_internal) { - alloc_error = cx_array_move_to_new(json->vbuf, json->vbuf.size+1); + alloc_error = cx_array_copy_to_new(json->vbuf, json->vbuf.size+1); } else { alloc_error = cx_array_reserve(json->vbuf, json->vbuf.size+1); } @@ -620,7 +620,7 @@ if (required_states_depth >= json->states.capacity) { int alloc_error; if (json->states.data == json->states_internal) { - alloc_error = cx_array_move_to_new(json->states, required_states_depth); + alloc_error = cx_array_copy_to_new(json->states, required_states_depth); } else { alloc_error = cx_array_reserve(json->states, required_states_depth); }