From b3f924bc695ed6ebe2539d365197696e41863a91 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 15 Dec 2017 11:07:10 -0200 Subject: 'Proto->numparams' does not include vararg parameter (one less subtraction when calling functions...) --- ldebug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ldebug.c') diff --git a/ldebug.c b/ldebug.c index 93f2d53d..11d2b6a7 100644 --- a/ldebug.c +++ b/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 2.147 2017/12/07 15:44:10 roberto Exp roberto $ +** $Id: ldebug.c,v 2.148 2017/12/13 18:32:09 roberto Exp roberto $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -328,7 +328,7 @@ static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar, } else { ar->isvararg = f->l.p->is_vararg; - ar->nparams = f->l.p->numparams; + ar->nparams = f->l.p->numparams + f->l.p->is_vararg; } break; } -- cgit v1.2.3-55-g6feb