aboutsummaryrefslogtreecommitdiff
path: root/src/state.cpp
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-05-20 12:13:13 +0200
committerBenoit Germain <benoit.germain@ubisoft.com>2024-05-20 12:13:13 +0200
commit5e5f08558010890206e1d2d11045870c35eb23cf (patch)
treeed4ae3ce5e5cc1a15eaf5bb1f4e7527d86f10351 /src/state.cpp
parent4d0d86f197eda7215a259286d8791efe27df8bde (diff)
downloadlanes-5e5f08558010890206e1d2d11045870c35eb23cf.tar.gz
lanes-5e5f08558010890206e1d2d11045870c35eb23cf.tar.bz2
lanes-5e5f08558010890206e1d2d11045870c35eb23cf.zip
Fixed forgotten int → LuaError
Diffstat (limited to 'src/state.cpp')
-rw-r--r--src/state.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/state.cpp b/src/state.cpp
index a6c9859..e258f9e 100644
--- a/src/state.cpp
+++ b/src/state.cpp
@@ -67,12 +67,12 @@ THE SOFTWARE.
67 67
68 _U->requireMutex.lock(); 68 _U->requireMutex.lock();
69 // starting with Lua 5.4, require may return a second optional value, so we need LUA_MULTRET 69 // starting with Lua 5.4, require may return a second optional value, so we need LUA_MULTRET
70 int _rc{ lua_pcall(L_, _args, LUA_MULTRET, 0 /*errfunc*/) }; // L_: err|result(s) 70 LuaError const _rc{ lua_pcall(L_, _args, LUA_MULTRET, 0 /*errfunc*/) }; // L_: err|result(s)
71 _U->requireMutex.unlock(); 71 _U->requireMutex.unlock();
72 72
73 // the required module (or an error message) is left on the stack as returned value by original require function 73 // the required module (or an error message) is left on the stack as returned value by original require function
74 74
75 if (_rc != LUA_OK) { // LUA_ERRRUN / LUA_ERRMEM ? 75 if (_rc != LuaError::OK) { // LUA_ERRRUN / LUA_ERRMEM ?
76 raise_lua_error(L_); 76 raise_lua_error(L_);
77 } 77 }
78 // should be 1 for Lua <= 5.3, 1 or 2 starting with Lua 5.4 78 // should be 1 for Lua <= 5.3, 1 or 2 starting with Lua 5.4