mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Return explicitly when failing to register a metatable
This commit is contained in:
parent
87206a8c21
commit
9f851dc285
1 changed files with 1 additions and 1 deletions
|
@ -257,7 +257,7 @@ static int lib_registerMetatable(lua_State *L)
|
|||
luaL_checktype(L, 1, LUA_TTABLE);
|
||||
|
||||
if (nextid == 0)
|
||||
luaL_error(L, "Too many metatables registered?! Please consider rewriting your script once you are sober again.\n");
|
||||
return luaL_error(L, "Too many metatables registered?! Please consider rewriting your script once you are sober again.\n");
|
||||
|
||||
lua_getfield(L, LUA_REGISTRYINDEX, LREG_METATABLES); // 2
|
||||
// registry.metatables[metatable] = nextid
|
||||
|
|
Loading…
Reference in a new issue