diff options
author | worktycho <work.tycho@gmail.com> | 2014-05-29 20:44:36 +0200 |
---|---|---|
committer | worktycho <work.tycho@gmail.com> | 2014-05-29 20:44:36 +0200 |
commit | be10f07db02565fad77937bc6e9ccc6580f19158 (patch) | |
tree | 21bbdfefa4b5d8d898966a5379f11fd0bacdceaa | |
parent | Derp (diff) | |
download | cuberite-be10f07db02565fad77937bc6e9ccc6580f19158.tar cuberite-be10f07db02565fad77937bc6e9ccc6580f19158.tar.gz cuberite-be10f07db02565fad77937bc6e9ccc6580f19158.tar.bz2 cuberite-be10f07db02565fad77937bc6e9ccc6580f19158.tar.lz cuberite-be10f07db02565fad77937bc6e9ccc6580f19158.tar.xz cuberite-be10f07db02565fad77937bc6e9ccc6580f19158.tar.zst cuberite-be10f07db02565fad77937bc6e9ccc6580f19158.zip |
-rw-r--r-- | src/ChunkData.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ChunkData.cpp b/src/ChunkData.cpp index 382e7a5a8..be96be051 100644 --- a/src/ChunkData.cpp +++ b/src/ChunkData.cpp @@ -343,7 +343,7 @@ void cChunkData::CopyBlockTypes(BLOCKTYPE * a_Dest, size_t a_Idx, size_t a_Lengt ToSkip = std::max((ssize_t)ToSkip - (ssize_t)SectionBlockCount, (ssize_t) 0); StartPos = SectionBlockCount - ToSkip; } - if (ToSkip == 0) + if (ToSkip < SectionBlockCount) { size_t ToCopy = std::min(SectionBlockCount, a_Length); a_Length -= ToCopy; |