summaryrefslogtreecommitdiff
path: root/lib/lua/src/LuaLib/liolib.c
diff options
context:
space:
mode:
authorpixel <pixel>2004-12-27 19:52:23 +0000
committerpixel <pixel>2004-12-27 19:52:23 +0000
commitffbd44960ec46c3c0def38821623a62d696c6018 (patch)
tree1b8dca54fd64287cda5095348160011eed41f14a /lib/lua/src/LuaLib/liolib.c
parent73b826216433355c36cac2b679dbbe755df53284 (diff)
Updating lua to 5.0.2
Diffstat (limited to 'lib/lua/src/LuaLib/liolib.c')
-rw-r--r--lib/lua/src/LuaLib/liolib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/lua/src/LuaLib/liolib.c b/lib/lua/src/LuaLib/liolib.c
index 69e0a19..29c4821 100644
--- a/lib/lua/src/LuaLib/liolib.c
+++ b/lib/lua/src/LuaLib/liolib.c
@@ -1,5 +1,5 @@
/*
-** $Id: liolib.c,v 1.4 2004-11-27 21:46:10 pixel Exp $
+** $Id: liolib.c,v 1.5 2004-12-27 19:52:23 pixel Exp $
** Standard I/O (and system) library
** See Copyright Notice in lua.h
*/
@@ -158,7 +158,7 @@ static int aux_close (lua_State *L) {
static int io_close (lua_State *L) {
- if (lua_isnone(L, 1)) {
+ if (lua_isnone(L, 1) && lua_type(L, lua_upvalueindex(1)) == LUA_TTABLE) {
lua_pushstring(L, IO_OUTPUT);
lua_rawget(L, lua_upvalueindex(1));
}
@@ -175,7 +175,7 @@ static int io_gc (lua_State *L) {
static int io_tostring (lua_State *L) {
- char buff[32];
+ char buff[128];
FILE **f = topfile(L, 1);
if (*f == NULL)
strcpy(buff, "closed");