diff options
-rw-r--r-- | opcode.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_opcode="$Id: opcode.c,v 3.76 1996/09/24 21:46:44 roberto Exp roberto $"; | 6 | char *rcs_opcode="$Id: opcode.c,v 3.77 1996/11/18 13:48:44 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <setjmp.h> | 8 | #include <setjmp.h> |
9 | #include <stdio.h> | 9 | #include <stdio.h> |
@@ -399,11 +399,11 @@ void lua_error (char *s) | |||
399 | 399 | ||
400 | lua_Function lua_stackedfunction (int level) | 400 | lua_Function lua_stackedfunction (int level) |
401 | { | 401 | { |
402 | Object *p = top; | 402 | StkId i; |
403 | while (--p >= stack) | 403 | for (i = (top-1)-stack; i>=0; i--) |
404 | if (p->tag == LUA_T_MARK || p->tag == LUA_T_CMARK) | 404 | if (stack[i].tag == LUA_T_MARK || stack[i].tag == LUA_T_CMARK) |
405 | if (level-- == 0) | 405 | if (level-- == 0) |
406 | return Ref(p); | 406 | return Ref(stack+i); |
407 | return LUA_NOOBJECT; | 407 | return LUA_NOOBJECT; |
408 | } | 408 | } |
409 | 409 | ||