diff options
author | madmaxoft <github@xoft.cz> | 2014-04-04 11:47:46 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-04-04 11:47:46 +0200 |
commit | 4be894f0601fcfa182fda045b07b196e5dcd9343 (patch) | |
tree | c3864d80195075b0c994f8b1b3e91f06f66bf93f /src/Protocol/ChunkDataSerializer.cpp | |
parent | Fixed CreateHexDump's format string. (diff) | |
download | cuberite-4be894f0601fcfa182fda045b07b196e5dcd9343.tar cuberite-4be894f0601fcfa182fda045b07b196e5dcd9343.tar.gz cuberite-4be894f0601fcfa182fda045b07b196e5dcd9343.tar.bz2 cuberite-4be894f0601fcfa182fda045b07b196e5dcd9343.tar.lz cuberite-4be894f0601fcfa182fda045b07b196e5dcd9343.tar.xz cuberite-4be894f0601fcfa182fda045b07b196e5dcd9343.tar.zst cuberite-4be894f0601fcfa182fda045b07b196e5dcd9343.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Protocol/ChunkDataSerializer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Protocol/ChunkDataSerializer.cpp b/src/Protocol/ChunkDataSerializer.cpp index 78318a5ee..ebe61631b 100644 --- a/src/Protocol/ChunkDataSerializer.cpp +++ b/src/Protocol/ChunkDataSerializer.cpp @@ -105,7 +105,7 @@ void cChunkDataSerializer::Serialize29(AString & a_Data) a_Data.append((const char *)&BitMap1, sizeof(short)); a_Data.append((const char *)&BitMap2, sizeof(short)); - Int32 CompressedSizeBE = htonl(CompressedSize); + UInt32 CompressedSizeBE = htonl((UInt32)CompressedSize); a_Data.append((const char *)&CompressedSizeBE, sizeof(CompressedSizeBE)); Int32 UnusedInt32 = 0; @@ -163,7 +163,7 @@ void cChunkDataSerializer::Serialize39(AString & a_Data) a_Data.append((const char *)&BitMap1, sizeof(short)); a_Data.append((const char *)&BitMap2, sizeof(short)); - Int32 CompressedSizeBE = htonl(CompressedSize); + UInt32 CompressedSizeBE = htonl((UInt32)CompressedSize); a_Data.append((const char *)&CompressedSizeBE, sizeof(CompressedSizeBE)); // Unlike 29, 39 doesn't have the "unused" int |