From bc8619342ae67226b55598047ab677bd93dfba5e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 21 May 1999 14:23:15 -0300 Subject: [PATCH] better control of stack size (only for DEBUG). --- lvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lvm.c b/lvm.c index db7e3a56..376e9506 100644 --- a/lvm.c +++ b/lvm.c @@ -1,5 +1,5 @@ /* -** $Id: lvm.c,v 1.54 1999/03/10 14:09:45 roberto Exp roberto $ +** $Id: lvm.c,v 1.55 1999/04/13 19:28:49 roberto Exp roberto $ ** Lua virtual machine ** See Copyright Notice in lua.h */ @@ -620,7 +620,8 @@ StkId luaV_execute (Closure *cl, TProtoFunc *tf, StkId base) { goto switchentry; /* do not reset "aux" */ case CHECKSTACK: aux = *pc++; - LUA_ASSERT((S->top-S->stack)-base == aux, "wrong stack size"); + LUA_ASSERT((S->top-S->stack)-base == aux && S->last >= S->top, + "wrong stack size"); break; }