From 382a42b3d6a5b1808ad9c8bfe1494ad44676c14b Mon Sep 17 00:00:00 2001 From: Howaner Date: Sun, 14 Sep 2014 14:24:28 +0200 Subject: Fixed warnings. --- src/Protocol/ChunkDataSerializer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Protocol/ChunkDataSerializer.cpp b/src/Protocol/ChunkDataSerializer.cpp index 268cf4a9f..61df24c31 100644 --- a/src/Protocol/ChunkDataSerializer.cpp +++ b/src/Protocol/ChunkDataSerializer.cpp @@ -192,8 +192,8 @@ void cChunkDataSerializer::Serialize80(AString & a_Data, int a_ChunkX, int a_Chu { BLOCKTYPE BlockType = m_BlockTypes[Index] & 0xFF; NIBBLETYPE BlockMeta = m_BlockMetas[Index / 2] >> ((Index & 1) * 4) & 0x0f; - Blocks[LastOffset] = (BlockType << 4) | ((unsigned char)BlockMeta); - Blocks[LastOffset + 1] = (unsigned char)BlockType >> 4; + Blocks[LastOffset] = (unsigned char)(BlockType << 4) | BlockMeta; + Blocks[LastOffset + 1] = (unsigned char)(BlockType >> 4); LastOffset += 2; } @@ -215,7 +215,7 @@ void cChunkDataSerializer::Serialize80(AString & a_Data, int a_ChunkX, int a_Chu Packet.WriteBEInt(a_ChunkX); Packet.WriteBEInt(a_ChunkZ); Packet.WriteBool(true); // "Ground-up continuous", or rather, "biome data present" flag - Packet.WriteBEShort(0xffff); // We're aways sending the full chunk with no additional data, so the bitmap is 0xffff + Packet.WriteBEShort((short) 0xffff); // We're aways sending the full chunk with no additional data, so the bitmap is 0xffff Packet.WriteVarInt(DataSize); // Chunk size Packet.WriteBuf(AllData, DataSize); // Chunk data -- cgit v1.2.3