summaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/cpp_api/s_inventory.cpp')
-rw-r--r--src/script/cpp_api/s_inventory.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/script/cpp_api/s_inventory.cpp b/src/script/cpp_api/s_inventory.cpp
index c8c90fd8f..019d1ccc0 100644
--- a/src/script/cpp_api/s_inventory.cpp
+++ b/src/script/cpp_api/s_inventory.cpp
@@ -209,6 +209,9 @@ bool ScriptApiDetached::getDetachedInventoryCallback(
lua_pop(L, 1);
return false;
}
+
+ setOriginFromTable(-1);
+
lua_getfield(L, -1, callbackname);
lua_remove(L, -2);
// Should be a function or nil