Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Array.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,13 @@ integer setArraySize(string arrayId, integer size)
g_arrayInfo = llDeleteSubList(g_arrayInfo, infoIndex, infoIndex + 1);

// Remove array data
g_arrayData = llDeleteSubList(g_arrayData, dataOffset, dataOffset + oldSize - 1);
// Only attempt to remove data if the array actually had data
// If oldSize is 0, dataOffset + oldSize - 1 < dataOffset, causing llDeleteSubList
// to behave as an exclusion range (deleting everything BUT the range)
if (oldSize > 0)
{
g_arrayData = llDeleteSubList(g_arrayData, dataOffset, dataOffset + oldSize - 1);
}
return TRUE;
}

Expand Down
Loading