From d48bd03722349fca4bac50dbdf544526fe0759dd Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Wed, 11 Mar 2026 07:28:03 +1100 Subject: [PATCH] Use standard byte pointers in decompression helpers --- Minecraft.World/IO/Streams/Compression.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Minecraft.World/IO/Streams/Compression.cpp b/Minecraft.World/IO/Streams/Compression.cpp index 2f0947191..899aae280 100644 --- a/Minecraft.World/IO/Streams/Compression.cpp +++ b/Minecraft.World/IO/Streams/Compression.cpp @@ -426,8 +426,8 @@ HRESULT Compression::DecompressWithType(void *pDestination, unsigned int *pDestS if (pDestination != NULL) { // Read big-endian srcize from array - PBYTE pbDestSize = (PBYTE) pDestSize; - PBYTE pbSource = (PBYTE) pSource; + std::uint8_t* pbDestSize = reinterpret_cast(pDestSize); + std::uint8_t* pbSource = reinterpret_cast(pSource); for (int i = 3; i >= 0; i--) { pbDestSize[3-i] = pbSource[i]; } @@ -442,7 +442,7 @@ HRESULT Compression::DecompressWithType(void *pDestination, unsigned int *pDestS strm.next_out = uncompr.data; strm.avail_out = uncompr.length; // Skip those first 4 bytes - strm.next_in = (PBYTE) pSource + 4; + strm.next_in = reinterpret_cast(pSource) + 4; strm.avail_in = SrcSize - 4; int hr = inflateInit2(&strm, -15); @@ -549,4 +549,3 @@ void Compression::SetDecompressionType(ESavePlatform platform) /*Compression gCompression;*/ -