Fix lua object added to container error

The reference count of the deleted object was changed,
instead of the object that it was merged into.
This commit is contained in:
Pasi Kallinen
2023-08-24 09:22:38 +03:00
parent 9ee6f29c06
commit 0794a64b9d

View File

@@ -126,8 +126,8 @@ l_obj_add_to_container(lua_State *L)
/* was lo->obj merged? */
if (otmp != lo->obj) {
lo->obj->lua_ref_cnt += refs;
lo->obj = otmp;
lo->obj->lua_ref_cnt += refs;
}
return 0;