From 228c4787d4a744d2818c9efa1ae333fb733c6bd5 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Tue, 20 Aug 2019 00:44:18 +0200 Subject: [PATCH] Fixed a small bug --- src/ComputeSharp.Graphics/Buffers/ConstantBuffer{T}.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ComputeSharp.Graphics/Buffers/ConstantBuffer{T}.cs b/src/ComputeSharp.Graphics/Buffers/ConstantBuffer{T}.cs index 6e19703b..9a7d76fc 100644 --- a/src/ComputeSharp.Graphics/Buffers/ConstantBuffer{T}.cs +++ b/src/ComputeSharp.Graphics/Buffers/ConstantBuffer{T}.cs @@ -47,7 +47,7 @@ namespace ComputeSharp.Graphics.Buffers { // Create the temporary array byte[] temporaryArray = ArrayPool.Shared.Rent(count * PaddedElementSizeInBytes); - Span temporarySpan = temporaryArray.AsSpan(count * PaddedElementSizeInBytes); + Span temporarySpan = temporaryArray.AsSpan(0, count * PaddedElementSizeInBytes); // Copy the padded data to the temporary array Map(0);