diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1223,8 +1223,9 @@ static lua_State *getstate (lua_State *L) { | |||
1223 | 1223 | ||
1224 | static int loadlib (lua_State *L) { | 1224 | static int loadlib (lua_State *L) { |
1225 | lua_State *L1 = getstate(L); | 1225 | lua_State *L1 = getstate(L); |
1226 | int what = luaL_checkinteger(L, 2); | 1226 | int load = luaL_checkinteger(L, 2); |
1227 | luaL_openselectedlibs(L1, what); | 1227 | int preload = luaL_checkinteger(L, 3); |
1228 | luaL_openselectedlibs(L1, load, preload); | ||
1228 | luaL_requiref(L1, "T", luaB_opentests, 0); | 1229 | luaL_requiref(L1, "T", luaB_opentests, 0); |
1229 | lua_assert(lua_type(L1, -1) == LUA_TTABLE); | 1230 | lua_assert(lua_type(L1, -1) == LUA_TTABLE); |
1230 | /* 'requiref' should not reload module already loaded... */ | 1231 | /* 'requiref' should not reload module already loaded... */ |