lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 10b4799ce57100545cd27bc7c7b2fd83c6c30ab8
parent a0de89d62a71b944e56264ec948e01cad12d5602
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Thu, 31 Aug 2000 10:29:48 -0300

details

Diffstat:
Mliolib.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/liolib.c b/liolib.c @@ -1,5 +1,5 @@ /* -** $Id: liolib.c,v 1.73 2000/08/29 14:33:31 roberto Exp roberto $ +** $Id: liolib.c,v 1.74 2000/08/29 20:43:28 roberto Exp roberto $ ** Standard I/O (and system) library ** See Copyright Notice in lua.h */ @@ -159,7 +159,7 @@ static int file_collect (lua_State *L) { IOCtrl *ctrl = (IOCtrl *)lua_touserdata(L, -1); lua_settop(L, -1); /* remove upvalue */ if (ctrl == (IOCtrl *)lua_touserdata(L, 1)) { - /* collectig `ctrl' itself */ + /* collecting `ctrl' itself */ lua_unref(L, ctrl->ref[INFILE]); lua_unref(L, ctrl->ref[OUTFILE]); free(ctrl); @@ -372,7 +372,8 @@ static int io_read (lua_State *L) { firstarg = lastarg = 1; /* correct indices */ lua_pushstring(L, "*l"); /* push default argument */ } - luaL_checkstack(L, lastarg-firstarg+1, "too many results"); + else + luaL_checkstack(L, lastarg-firstarg+1, "too many arguments"); for (n = firstarg; n<=lastarg; n++) { size_t l; int success;