diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-08-29 17:43:28 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-08-29 17:43:28 -0300 |
commit | a97f29f15487c5f584185f646f9cfc06a04b26ca (patch) | |
tree | e7ffd959fb80f9622d74a2efadfd7880037d64ca /liolib.c | |
parent | 4135f4f5862b57d9dbf3e9b7c6507f5c86516327 (diff) | |
download | lua-a97f29f15487c5f584185f646f9cfc06a04b26ca.tar.gz lua-a97f29f15487c5f584185f646f9cfc06a04b26ca.tar.bz2 lua-a97f29f15487c5f584185f646f9cfc06a04b26ca.zip |
explicit stack control in the API
Diffstat (limited to 'liolib.c')
-rw-r--r-- | liolib.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: liolib.c,v 1.72 2000/08/28 17:57:04 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 1.73 2000/08/29 14:33:31 roberto Exp roberto $ |
3 | ** Standard I/O (and system) library | 3 | ** Standard I/O (and system) library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -372,6 +372,7 @@ static int io_read (lua_State *L) { | |||
372 | firstarg = lastarg = 1; /* correct indices */ | 372 | firstarg = lastarg = 1; /* correct indices */ |
373 | lua_pushstring(L, "*l"); /* push default argument */ | 373 | lua_pushstring(L, "*l"); /* push default argument */ |
374 | } | 374 | } |
375 | luaL_checkstack(L, lastarg-firstarg+1, "too many results"); | ||
375 | for (n = firstarg; n<=lastarg; n++) { | 376 | for (n = firstarg; n<=lastarg; n++) { |
376 | size_t l; | 377 | size_t l; |
377 | int success; | 378 | int success; |