Skip to content

Commit

Permalink
Lua: Fix out array not using sol::make_object
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Oct 18, 2024
1 parent e62d19b commit e032b90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua-api/lib/src/ScriptUtility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ sol::object prop_to_object(sol::this_state s, void* self, uevr::API::FProperty*
auto lua_arr = sol::state_view{s}.create_table();

for (size_t i = 0; i < arr.count; ++i) {
lua_arr[i + 1] = arr.data[i];
lua_arr[i + 1] = sol::make_object(s, arr.data[i]);
}

return sol::make_object(s, lua_arr);
Expand All @@ -221,7 +221,7 @@ sol::object prop_to_object(sol::this_state s, void* self, uevr::API::FProperty*
auto lua_arr = sol::state_view{s}.create_table();

for (size_t i = 0; i < arr.count; ++i) {
lua_arr[i + 1] = arr.data[i];
lua_arr[i + 1] = sol::make_object(s, arr.data[i]);
}

return sol::make_object(s, lua_arr);
Expand Down

0 comments on commit e032b90

Please sign in to comment.