From 402c26131da9d6e6240bb591b699da544e539769 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Tue, 19 Sep 2023 13:40:48 -0700 Subject: [PATCH] fix erroneous GetData length warning --- src/Graphics/Resources/Buffer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Graphics/Resources/Buffer.cs b/src/Graphics/Resources/Buffer.cs index bf86c0da..8563ac9c 100644 --- a/src/Graphics/Resources/Buffer.cs +++ b/src/Graphics/Resources/Buffer.cs @@ -74,7 +74,7 @@ namespace MoonWorks.Graphics Logger.LogWarn("Requested too many bytes from buffer!"); } - if (dataLengthInBytes > data.Length) + if (dataLengthInBytes > data.Length * Marshal.SizeOf()) { Logger.LogWarn("Data length is larger than the provided Span!"); }