From 079bea4999ab30878e7c170d441b0ff115b869bb Mon Sep 17 00:00:00 2001 From: Justin Swanson Date: Mon, 23 Feb 2026 15:04:17 -0600 Subject: [PATCH] Fix ReadDouble to load 8 bytes instead of 4 BinaryReadStream.ReadDouble() was calling LoadPosition(4) instead of LoadPosition(8), reading only 4 bytes (float size) instead of the 8 bytes required for a double. --- Noggog.CSharpExt/Streams/Binary/BinaryReadStream.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Noggog.CSharpExt/Streams/Binary/BinaryReadStream.cs b/Noggog.CSharpExt/Streams/Binary/BinaryReadStream.cs index 07dd18c..beaea63 100644 --- a/Noggog.CSharpExt/Streams/Binary/BinaryReadStream.cs +++ b/Noggog.CSharpExt/Streams/Binary/BinaryReadStream.cs @@ -328,10 +328,10 @@ public float ReadFloat() return _internalMemoryStream.ReadFloat(); } - public double ReadDouble() - { - LoadPosition(4); - return _internalMemoryStream.ReadDouble(); + public double ReadDouble() + { + LoadPosition(8); + return _internalMemoryStream.ReadDouble(); } public string ReadStringUTF8(int amount)