explicit stack control in the API
This commit is contained in:
3
liolib.c
3
liolib.c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: liolib.c,v 1.72 2000/08/28 17:57:04 roberto Exp roberto $
|
||||
** $Id: liolib.c,v 1.73 2000/08/29 14:33:31 roberto Exp roberto $
|
||||
** Standard I/O (and system) library
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@@ -372,6 +372,7 @@ 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");
|
||||
for (n = firstarg; n<=lastarg; n++) {
|
||||
size_t l;
|
||||
int success;
|
||||
|
||||
Reference in New Issue
Block a user