Skip to content

Commit

Permalink
a simple fix for uninitialized dynamic array data
Browse files Browse the repository at this point in the history
  • Loading branch information
foerdi authored and dlang-bot committed Dec 17, 2020
1 parent fc1625a commit 904a1ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/containers/dynamicarray.d
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ struct DynamicArray(T, Allocator = Mallocator, bool supportGC = shouldAddGCRange
static if (is(T == struct) && (hasElaborateAssign!T || hasElaborateDestructor!T))
{
foreach (i; l..n)
emplace(arr[l], value);
emplace(arr[i], value);
}
else
arr[l..n] = value;
Expand Down

0 comments on commit 904a1ad

Please sign in to comment.