Bug: yielding in '__close' mess up number of returns

Yielding in a __close metamethod called when returning vararg results
changes the top and so messes up the number of returned values.
This commit is contained in:
Roberto Ierusalimschy
2021-04-16 15:41:44 -03:00
parent 5148954eed
commit 681297187e
3 changed files with 71 additions and 2 deletions

View File

@@ -165,7 +165,7 @@ typedef struct stringtable {
** - field 'nyield' is used only while a function is "doing" an
** yield (from the yield until the next resume);
** - field 'nres' is used only while closing tbc variables when
** returning from a C function;
** returning from a function;
** - field 'transferinfo' is used only during call/returnhooks,
** before the function starts or after it ends.
*/