diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-10-09 14:10:41 +0200 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-10-09 14:10:41 +0200 |
commit | f951a2528325af8e1a9ef17f9a765ad68825aec7 (patch) | |
tree | c0fad320c151dec86590c3746dcbaaf5657df11c /src/WorldStorage | |
parent | Update apidoc (diff) | |
parent | Updated the Core plugin. (diff) | |
download | cuberite-f951a2528325af8e1a9ef17f9a765ad68825aec7.tar cuberite-f951a2528325af8e1a9ef17f9a765ad68825aec7.tar.gz cuberite-f951a2528325af8e1a9ef17f9a765ad68825aec7.tar.bz2 cuberite-f951a2528325af8e1a9ef17f9a765ad68825aec7.tar.lz cuberite-f951a2528325af8e1a9ef17f9a765ad68825aec7.tar.xz cuberite-f951a2528325af8e1a9ef17f9a765ad68825aec7.tar.zst cuberite-f951a2528325af8e1a9ef17f9a765ad68825aec7.zip |
Diffstat (limited to 'src/WorldStorage')
-rw-r--r-- | src/WorldStorage/MapSerializer.cpp | 2 | ||||
-rw-r--r-- | src/WorldStorage/SchematicFileSerializer.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/WorldStorage/MapSerializer.cpp b/src/WorldStorage/MapSerializer.cpp index 3899ad505..c34efe507 100644 --- a/src/WorldStorage/MapSerializer.cpp +++ b/src/WorldStorage/MapSerializer.cpp @@ -163,7 +163,7 @@ bool cMapSerializer::LoadMapFromNBT(const cParsedNBT & a_NBT) if ((CurrLine >= 0) && (a_NBT.GetType(CurrLine) == TAG_Short)) { unsigned int Height = static_cast<unsigned int>(a_NBT.GetShort(CurrLine)); - if (Height >= 256) + if (Height >= cChunkDef::Height) { return false; } diff --git a/src/WorldStorage/SchematicFileSerializer.cpp b/src/WorldStorage/SchematicFileSerializer.cpp index 3fc36e86c..d6bcf840f 100644 --- a/src/WorldStorage/SchematicFileSerializer.cpp +++ b/src/WorldStorage/SchematicFileSerializer.cpp @@ -164,7 +164,7 @@ bool cSchematicFileSerializer::LoadFromSchematicNBT(cBlockArea & a_BlockArea, cP int SizeX = a_NBT.GetShort(TSizeX); int SizeY = a_NBT.GetShort(TSizeY); int SizeZ = a_NBT.GetShort(TSizeZ); - if ((SizeX < 1) || (SizeX > 65535) || (SizeY < 1) || (SizeY > 256) || (SizeZ < 1) || (SizeZ > 65535)) + if ((SizeX < 1) || (SizeX > 65535) || (SizeY < 1) || (SizeY > cChunkDef::Height) || (SizeZ < 1) || (SizeZ > 65535)) { LOG("Dimensions are invalid in the schematic file: %d, %d, %d", SizeX, SizeY, SizeZ); return false; |