More size_t fixes.
This commit is contained in:
parent
5b54dc3eac
commit
d67ea97a26
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user