summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/WSSAnvil.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-05-09 19:57:59 +0200
committerMattes D <github@xoft.cz>2014-05-09 19:57:59 +0200
commitd67ea97a266412c2ca1d45d5e907f3072e0b53a2 (patch)
treeb7a9a52e7a9a2d774163088069e06084a5afd986 /src/WorldStorage/WSSAnvil.cpp
parentBuild fixes after the last size_t batch. (diff)
downloadcuberite-d67ea97a266412c2ca1d45d5e907f3072e0b53a2.tar
cuberite-d67ea97a266412c2ca1d45d5e907f3072e0b53a2.tar.gz
cuberite-d67ea97a266412c2ca1d45d5e907f3072e0b53a2.tar.bz2
cuberite-d67ea97a266412c2ca1d45d5e907f3072e0b53a2.tar.lz
cuberite-d67ea97a266412c2ca1d45d5e907f3072e0b53a2.tar.xz
cuberite-d67ea97a266412c2ca1d45d5e907f3072e0b53a2.tar.zst
cuberite-d67ea97a266412c2ca1d45d5e907f3072e0b53a2.zip
Diffstat (limited to 'src/WorldStorage/WSSAnvil.cpp')
-rw-r--r--src/WorldStorage/WSSAnvil.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp
index 52cea462c..d310c9124 100644
--- a/src/WorldStorage/WSSAnvil.cpp
+++ b/src/WorldStorage/WSSAnvil.cpp
@@ -405,7 +405,7 @@ bool cWSSAnvil::LoadChunkFromNBT(const cChunkCoords & a_Chunk, const cParsedNBT
-void cWSSAnvil::CopyNBTData(const cParsedNBT & a_NBT, int a_Tag, const AString & a_ChildName, char * a_Destination, int a_Length)
+void cWSSAnvil::CopyNBTData(const cParsedNBT & a_NBT, int a_Tag, const AString & a_ChildName, char * a_Destination, size_t a_Length)
{
int Child = a_NBT.FindChildByName(a_Tag, a_ChildName);
if ((Child >= 0) && (a_NBT.GetType(Child) == TAG_ByteArray) && (a_NBT.GetDataLength(Child) == a_Length))
@@ -440,8 +440,8 @@ bool cWSSAnvil::SaveChunkToNBT(const cChunkCoords & a_Chunk, cFastNBTWriter & a_
// Save blockdata:
a_Writer.BeginList("Sections", TAG_Compound);
- int SliceSizeBlock = cChunkDef::Width * cChunkDef::Width * 16;
- int SliceSizeNibble = SliceSizeBlock / 2;
+ size_t SliceSizeBlock = cChunkDef::Width * cChunkDef::Width * 16;
+ size_t SliceSizeNibble = SliceSizeBlock / 2;
const char * BlockTypes = (const char *)(Serializer.m_BlockTypes);
const char * BlockMetas = (const char *)(Serializer.m_BlockMetas);
#ifdef DEBUG_SKYLIGHT
@@ -2630,14 +2630,14 @@ bool cWSSAnvil::cMCAFile::GetChunkData(const cChunkCoords & a_Chunk, AString & a
unsigned ChunkLocation = ntohl(m_Header[LocalX + 32 * LocalZ]);
unsigned ChunkOffset = ChunkLocation >> 8;
- m_File.Seek(ChunkOffset * 4096);
+ m_File.Seek((int)ChunkOffset * 4096);
int ChunkSize = 0;
if (m_File.Read(&ChunkSize, 4) != 4)
{
return false;
}
- ChunkSize = ntohl(ChunkSize);
+ ChunkSize = ntohl((u_long)ChunkSize);
char CompressionType = 0;
if (m_File.Read(&CompressionType, 1) != 1)
{