Skip to content

Commit

Permalink
fix(lua): fix sol::optional wrapping pointers odd behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxiao921 committed Apr 27, 2024
1 parent 320acc0 commit b5ca15d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lua/lua_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ namespace big
{
sol::environment& env = this_env;
sol::optional<big::lua_module*> _this = env["!this"];
if (_this)

// That's weird.
if (_this && _this.value())
{
return _this.value();
}
Expand Down

0 comments on commit b5ca15d

Please sign in to comment.