summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2014-05-29 20:29:06 +0200
committerworktycho <work.tycho@gmail.com>2014-05-29 20:29:06 +0200
commitb50181e3614286b9624cf3b8f296d7b25509a55d (patch)
tree3c5f9a22f21c68b48bb4f7e0ac9d7e470bd3a1cc
parentFixed wrong block sizes for copying / setting. (diff)
downloadcuberite-b50181e3614286b9624cf3b8f296d7b25509a55d.tar
cuberite-b50181e3614286b9624cf3b8f296d7b25509a55d.tar.gz
cuberite-b50181e3614286b9624cf3b8f296d7b25509a55d.tar.bz2
cuberite-b50181e3614286b9624cf3b8f296d7b25509a55d.tar.lz
cuberite-b50181e3614286b9624cf3b8f296d7b25509a55d.tar.xz
cuberite-b50181e3614286b9624cf3b8f296d7b25509a55d.tar.zst
cuberite-b50181e3614286b9624cf3b8f296d7b25509a55d.zip
-rw-r--r--src/ChunkData.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ChunkData.cpp b/src/ChunkData.cpp
index 2628b3410..72187f393 100644
--- a/src/ChunkData.cpp
+++ b/src/ChunkData.cpp
@@ -340,7 +340,7 @@ void cChunkData::CopyBlockTypes(BLOCKTYPE * a_Dest, size_t a_Idx, size_t a_Lengt
size_t StartPos = 0;
if (ToSkip > 0)
{
- ToSkip = std::max(ToSkip - SectionBlockCount, (size_t) 0); // TODO: Still can underflow
+ ToSkip = std::max((ssize_t)ToSkip - (ssize_t)SectionBlockCount, (size_t) 0);
StartPos = SectionBlockCount - ToSkip;
}
if (ToSkip == 0)