Skip to content
Permalink
Browse files

Worked around a possible runtime bug in 3.0 preview.

  • Loading branch information...
RossNordby committed May 29, 2019
1 parent f6f0576 commit 23b0b187119fce274e6524a3f667be0f2bd7d421
Showing with 2 additions and 1 deletion.
  1. +1 −1 BepuUtilities/Memory/BufferPool.cs
  2. +1 −0 Demos/Demos.csproj
@@ -450,7 +450,7 @@ public unsafe void ResizeToAtLeast(ref RawBuffer buffer, int targetSize, int cop
if (currentSize != targetSize || pools[powerIndex].GetStartPointerForSlot(slotIndex) != buffer.Memory)
{
TakeAtLeast(targetSize, out var newBuffer);
Unsafe.CopyBlockUnaligned(newBuffer.Memory, buffer.Memory, (uint)copyCount);
Buffer.MemoryCopy(buffer.Memory, newBuffer.Memory, buffer.Length, copyCount);
pools[powerIndex].Return(slotIndex);
buffer = newBuffer;
}
@@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<!--<RuntimeFrameworkVersion>3.0.0-preview5-27626-15</RuntimeFrameworkVersion>-->
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<Configurations>Debug;Release;ReleaseStrip</Configurations>
<LangVersion>latest</LangVersion>

0 comments on commit 23b0b18

Please sign in to comment.
You can’t perform that action at this time.