Skip to content

Commit 6eff98d

Browse files
committed
FIX: crash in nested collect with an expression
related to: Oldes/Rebol-issues#2471
1 parent 0ae1baa commit 6eff98d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/c-do.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1047,8 +1047,8 @@ x*/ static REBINT Do_Args_Light(REBVAL *func, REBVAL *path, REBSER *block, REBCN
10471047
***********************************************************************/
10481048
{
10491049
REBVAL *tos = 0;
1050-
#if (ALEVEL>1)
10511050
REBINT start = DSP;
1051+
#if (ALEVEL>1)
10521052
// REBCNT gcd = GC_Disabled;
10531053
#endif
10541054

@@ -1091,7 +1091,7 @@ x*/ static REBINT Do_Args_Light(REBVAL *func, REBVAL *path, REBSER *block, REBCN
10911091
REBSER *series = VAL_SERIES(block);
10921092
REBCNT index = VAL_INDEX(block);
10931093
REBVAL *tos = 0;
1094-
REBINT start = DSP;
1094+
REBINT start = ++DSP;
10951095

10961096
while (index < BLK_LEN(series)) {
10971097
index = Do_Next(series, index, 0);
@@ -1107,7 +1107,7 @@ x*/ static REBINT Do_Args_Light(REBVAL *func, REBVAL *path, REBSER *block, REBCN
11071107
}
11081108

11091109
if (start != DSP || tos != &DS_Base[start+1]) Trap0(RE_MISSING_ARG);
1110-
1110+
DS_DROP;
11111111
return tos;
11121112
}
11131113

0 commit comments

Comments
 (0)