From 90ae25bc8ed6001d77c66957fc90a9ff175ac125 Mon Sep 17 00:00:00 2001 From: Persson-dev Date: Mon, 4 Aug 2025 09:40:48 +0200 Subject: [PATCH] fix byte swapping --- include/sp/common/DataBufferOperators.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sp/common/DataBufferOperators.h b/include/sp/common/DataBufferOperators.h index ef4f7a0..bf37f6b 100644 --- a/include/sp/common/DataBufferOperators.h +++ b/include/sp/common/DataBufferOperators.h @@ -299,8 +299,8 @@ namespace details { template void WriteRaw(DataBuffer& a_Buffer, T a_Data) { + SwapBytes(a_Data); a_Buffer.Append(a_Data); - SwapBytes(a_Buffer.data() + a_Buffer.GetReadOffset() - sizeof(T), a_Buffer.data() + a_Buffer.GetReadOffset()); } template