diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-12-20 07:55:56 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-12-20 07:55:56 -0200 |
commit | 75f73172c463af9643bc187eed7f1fd195238078 (patch) | |
tree | aeeb987f9c4fe24e6234c7cfe1bc4dc9da7561f7 | |
parent | 754c6307544f751d870c7b6636196e4405cab0b6 (diff) | |
download | lua-75f73172c463af9643bc187eed7f1fd195238078.tar.gz lua-75f73172c463af9643bc187eed7f1fd195238078.tar.bz2 lua-75f73172c463af9643bc187eed7f1fd195238078.zip |
bug: `resume' was checking the wrong value for stack overflow
-rw-r--r-- | bugs | 10 | ||||
-rw-r--r-- | lbaselib.c | 4 |
2 files changed, 12 insertions, 2 deletions
@@ -303,3 +303,13 @@ Fri Dec 6 17:06:40 UTC 2002 | |||
303 | >> scope of generic for variables is not sound | 303 | >> scope of generic for variables is not sound |
304 | (by Gavin Wraith; since 5.0a) | 304 | (by Gavin Wraith; since 5.0a) |
305 | 305 | ||
306 | |||
307 | |||
308 | |||
309 | ================================================================= | ||
310 | --- Version 5.0 beta | ||
311 | ** lbaselib.c | ||
312 | Fri Dec 20 09:53:19 UTC 2002 | ||
313 | >> `resume' was checking the wrong value for stack overflow | ||
314 | (by Maik Zimmermann; since 5.0b) | ||
315 | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.114 2002/12/04 17:38:31 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.115 2002/12/06 17:05:15 roberto Exp roberto $ |
3 | ** Basic library | 3 | ** Basic library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -540,7 +540,7 @@ static int auxresume (lua_State *L, lua_State *co, int narg) { | |||
540 | status = lua_resume(co, narg); | 540 | status = lua_resume(co, narg); |
541 | if (status == 0) { | 541 | if (status == 0) { |
542 | int nres = lua_gettop(co); | 542 | int nres = lua_gettop(co); |
543 | if (!lua_checkstack(L, narg)) | 543 | if (!lua_checkstack(L, nres)) |
544 | luaL_error(L, "too many results to resume"); | 544 | luaL_error(L, "too many results to resume"); |
545 | lua_xmove(co, L, nres); /* move yielded values */ | 545 | lua_xmove(co, L, nres); /* move yielded values */ |
546 | return nres; | 546 | return nres; |