Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit e6db269

Browse files
author
runrevali
committed
[ CI 16765 ] Correct after index when resolving element chunk extents
1 parent 307ebe0 commit e6db269

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

libscript/src/module-list.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ extern "C" MC_DLLEXPORT void MCListStoreIndexOf(MCValueRef p_value, MCProperList
184184
extern "C" MC_DLLEXPORT void MCListStoreAfterElementOf(MCValueRef p_value, index_t p_index, MCProperListRef& x_target)
185185
{
186186
uindex_t t_start, t_count;
187-
t_start += t_count;
188187
MCChunkGetExtentsOfElementChunkByExpression(x_target, p_index, t_start, t_count);
189188

190189
if (t_count == 0 || t_start + t_count > MCProperListGetLength(x_target))
@@ -193,6 +192,8 @@ extern "C" MC_DLLEXPORT void MCListStoreAfterElementOf(MCValueRef p_value, index
193192
return;
194193
}
195194

195+
t_start += t_count;
196+
196197
MCAutoProperListRef t_mutable_list;
197198
if (!MCProperListMutableCopy(x_target, &t_mutable_list))
198199
return;

0 commit comments

Comments
 (0)