diff --git a/src/box/lua/init.c b/src/box/lua/init.c index 63e8b8216e10ecad73a7d9cf29f0e2b70716922d..9db740de6afbf344864db0c8b2b5b305d7256733 100644 --- a/src/box/lua/init.c +++ b/src/box/lua/init.c @@ -432,10 +432,10 @@ box_lua_init(struct lua_State *L) const char *modsrc = *(s + 1); const char *modfile = lua_pushfstring(L, "@builtin/%s.lua", modname); - if (luaL_loadbuffer(L, modsrc, strlen(modsrc), modfile)) + if (luaL_loadbuffer(L, modsrc, strlen(modsrc), modfile) != 0 || + lua_pcall(L, 0, 0, 0) != 0) panic("Error loading Lua module %s...: %s", modname, lua_tostring(L, -1)); - lua_call(L, 0, 0); lua_pop(L, 1); /* modfile */ }