summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage
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
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')
-rw-r--r--src/WorldStorage/WSSAnvil.cpp10
-rw-r--r--src/WorldStorage/WSSAnvil.h2
2 files changed, 6 insertions, 6 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)
{
diff --git a/src/WorldStorage/WSSAnvil.h b/src/WorldStorage/WSSAnvil.h
index 1493f5f33..7542a828a 100644
--- a/src/WorldStorage/WSSAnvil.h
+++ b/src/WorldStorage/WSSAnvil.h
@@ -221,7 +221,7 @@ protected:
cMCAFile * LoadMCAFile(const cChunkCoords & a_Chunk);
/// Copies a_Length bytes of data from the specified NBT Tag's Child into the a_Destination buffer
- void CopyNBTData(const cParsedNBT & a_NBT, int a_Tag, const AString & a_ChildName, char * a_Destination, int a_Length);
+ void CopyNBTData(const cParsedNBT & a_NBT, int a_Tag, const AString & a_ChildName, char * a_Destination, size_t a_Length);
// cWSSchema overrides:
virtual bool LoadChunk(const cChunkCoords & a_Chunk) override;