mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
should use safe_script, not just script
This commit is contained in:
parent
0b6c7f47e7
commit
e60a628e16
|
@ -54,7 +54,7 @@ TEST_CASE("functions/empty std functions", "std::function is allowed to be empty
|
|||
lua["Foo"] = foo;
|
||||
lua["Bar"] = bar;
|
||||
|
||||
sol::optional<sol::error> result = lua.script(R"SCR(
|
||||
sol::optional<sol::error> result = lua.safe_script(R"SCR(
|
||||
if Bar ~= nil
|
||||
then
|
||||
Bar()
|
||||
|
|
Loading…
Reference in New Issue
Block a user