summaryrefslogtreecommitdiffstats
path: root/Sluift
diff options
context:
space:
mode:
Diffstat (limited to 'Sluift')
-rw-r--r--Sluift/linit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Sluift/linit.c b/Sluift/linit.c
index 14299b3..bb5d985 100644
--- a/Sluift/linit.c
+++ b/Sluift/linit.c
@@ -53,8 +53,7 @@ LUALIB_API void luaL_openlibs (lua_State *L) {
lua_pushstring(L, lib->name);
lua_call(L, 1, 0);
}
- int result = luaL_loadstring(L, tprint) || lua_pcall(L, 0, 0, 0);
- if (result != 0) {
+ if (luaL_dostring(L, tprint) != 0) {
fprintf(stderr, "%s\n", lua_tostring(L, -1));
lua_pop(L, 1);
}