diff --git a/include/sol/stack.hpp b/include/sol/stack.hpp index f35b1549..00ebb826 100644 --- a/include/sol/stack.hpp +++ b/include/sol/stack.hpp @@ -207,7 +207,7 @@ namespace sol { int push_count = push(L, std::forward(arg)); sol_c_assert(push_count == 1); std::size_t unique_index = static_cast(luaL_len(L, tableindex) + 1u); - lua_rawseti(L, tableindex, unique_index); + lua_rawseti(L, tableindex, static_cast(unique_index)); } } // namespace stack_detail