From f083812c020186d0d919833100c1a0b6eda8c2c0 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 9 Jan 2002 20:02:47 -0200 Subject: first implementation of coroutines --- lcode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lcode.c') diff --git a/lcode.c b/lcode.c index 4e8d23c1..a93b52b9 100644 --- a/lcode.c +++ b/lcode.c @@ -264,8 +264,7 @@ static int nil_constant (FuncState *fs) { void luaK_setcallreturns (FuncState *fs, expdesc *e, int nresults) { if (e->k == VCALL) { /* expression is an open function call? */ - if (nresults == LUA_MULTRET) nresults = NO_REG; - SETARG_C(getcode(fs, e), nresults); + SETARG_C(getcode(fs, e), nresults+1); if (nresults == 1) { /* `regular' expression? */ e->k = VNONRELOC; e->u.i.info = GETARG_A(getcode(fs, e)); -- cgit v1.2.3-55-g6feb