From ea2f09b2560ffef5f9e81453f5d9a5d0f0d87af0 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 16 Jul 2019 21:42:53 +0200 Subject: COMMON: Restored functionaluty of Lua print --- common/lua/lbaselib.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'common/lua') 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; } -- cgit v1.2.3