From fa2236e72a859eeee155729f7ad21710005f65d5 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sat, 1 Apr 2023 17:14:46 +0100 Subject: [PATCH] fix: write float, not double, in Stream.WriteSingle This was a side effect of 2815c505c35097b861c6646d98eadb5ebbb8a22c since I had copy/pasted the blocks. Oops. --- X10D/src/IO/StreamExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/X10D/src/IO/StreamExtensions.cs b/X10D/src/IO/StreamExtensions.cs index d2726b0..4202844 100644 --- a/X10D/src/IO/StreamExtensions.cs +++ b/X10D/src/IO/StreamExtensions.cs @@ -996,7 +996,7 @@ public static class StreamExtensions if (endianness == Endianness.LittleEndian) { #if NET5_0_OR_GREATER - BinaryPrimitives.WriteDoubleLittleEndian(buffer, value); + BinaryPrimitives.WriteSingleLittleEndian(buffer, value); #else if (BitConverter.IsLittleEndian) { @@ -1012,7 +1012,7 @@ public static class StreamExtensions else { #if NET5_0_OR_GREATER - BinaryPrimitives.WriteDoubleBigEndian(buffer, value); + BinaryPrimitives.WriteSingleBigEndian(buffer, value); #else if (BitConverter.IsLittleEndian) {