aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2019-07-16 21:42:53 +0200
committerEugene Sandulenko2019-09-03 17:17:21 +0200
commitea2f09b2560ffef5f9e81453f5d9a5d0f0d87af0 (patch)
tree80c5039b5d6413df1e62cc2a80fb962238650fb0
parent17e2c05417921f91851afda608bc99506a71673e (diff)
downloadscummvm-rg350-ea2f09b2560ffef5f9e81453f5d9a5d0f0d87af0.tar.gz
scummvm-rg350-ea2f09b2560ffef5f9e81453f5d9a5d0f0d87af0.tar.bz2
scummvm-rg350-ea2f09b2560ffef5f9e81453f5d9a5d0f0d87af0.zip
COMMON: Restored functionaluty of Lua print
-rw-r--r--common/lua/lbaselib.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/lua/lbaselib.cpp b/common/lua/lbaselib.cpp
index ec044970ad..22af019c0a 100644
--- a/common/lua/lbaselib.cpp
+++ b/common/lua/lbaselib.cpp
@@ -5,6 +5,8 @@
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_fputs
+#define FORBIDDEN_SYMBOL_EXCEPTION_stdout
#include "common/util.h"
@@ -37,8 +39,11 @@ static int luaB_print (lua_State *L) {
if (s == NULL)
return luaL_error(L, LUA_QL("tostring") " must return a string to "
LUA_QL("print"));
+ if (i>1) fputs("\t", stdout);
+ fputs(s, stdout);
lua_pop(L, 1); /* pop result */
}
+ fputs("\n", stdout);
return 0;
}