diff --git a/sol/table_core.hpp b/sol/table_core.hpp index c56c562a..bc95cacb 100644 --- a/sol/table_core.hpp +++ b/sol/table_core.hpp @@ -364,7 +364,7 @@ public: template table create_named(Name&& name, Args&&... args) { static const int narr = static_cast(meta::count_if_2_pack::value); - return create(lua_state(), narr, sizeof...(Args) / 2 - narr, std::forward(args)...); + return create(std::forward(name), narr, sizeof...(Args) / 2 - narr, std::forward(args)...); } }; } // sol