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