Skip to content

Commit 4a2e177

Browse files
author
Anthony Viallard
committed
load standard lua lib if not sandboxed
1 parent d801467 commit 4a2e177

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lf.c

+2
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ lua_State *LF_newstate(int sandbox, char *content_type)
210210
lua_register(l, "loadstring", &LF_loadstring);
211211
lua_register(l, "loadfile", &LF_loadfile);
212212
lua_register(l, "dofile", &LF_dofile);
213+
} else {
214+
luaL_openlibs(l);
213215
}
214216

215217
// Register the print function

0 commit comments

Comments
 (0)