Skip to content

Commit 904a1ad

Browse files
foerdidlang-bot
authored andcommitted
a simple fix for uninitialized dynamic array data
1 parent fc1625a commit 904a1ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/containers/dynamicarray.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ struct DynamicArray(T, Allocator = Mallocator, bool supportGC = shouldAddGCRange
296296
static if (is(T == struct) && (hasElaborateAssign!T || hasElaborateDestructor!T))
297297
{
298298
foreach (i; l..n)
299-
emplace(arr[l], value);
299+
emplace(arr[i], value);
300300
}
301301
else
302302
arr[l..n] = value;

0 commit comments

Comments
 (0)