diff options
-rw-r--r-- | src/yuescript/yuescript.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/yuescript/yuescript.cpp b/src/yuescript/yuescript.cpp index ead2841..ac1332e 100644 --- a/src/yuescript/yuescript.cpp +++ b/src/yuescript/yuescript.cpp | |||
@@ -380,7 +380,7 @@ YUE_API int luaopen_yue(lua_State* L) { | |||
380 | luaL_newlib(L, yuelib); // yue | 380 | luaL_newlib(L, yuelib); // yue |
381 | #else | 381 | #else |
382 | lua_getglobal(L, "package"); | 382 | lua_getglobal(L, "package"); |
383 | lua_getfield(L, "loaded"); | 383 | lua_getfield(L, -1, "loaded"); |
384 | luaL_register(L, nullptr, yuelib); // yue | 384 | luaL_register(L, nullptr, yuelib); // yue |
385 | #endif | 385 | #endif |
386 | lua_pushlstring(L, &yue::version.front(), yue::version.size()); // yue version | 386 | lua_pushlstring(L, &yue::version.front(), yue::version.size()); // yue version |