summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/WorldStorage/SchematicFileSerializer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/WorldStorage/SchematicFileSerializer.cpp b/src/WorldStorage/SchematicFileSerializer.cpp
index 64f4cb00d..fb881e290 100644
--- a/src/WorldStorage/SchematicFileSerializer.cpp
+++ b/src/WorldStorage/SchematicFileSerializer.cpp
@@ -184,7 +184,9 @@ bool cSchematicFileSerializer::LoadFromSchematicNBT(cBlockArea & a_BlockArea, cP
{
LOG("Dimensions are missing from the schematic file (%d, %d, %d), (%d, %d, %d)",
TSizeX, TSizeY, TSizeZ,
- a_NBT.GetType(TSizeX), a_NBT.GetType(TSizeY), a_NBT.GetType(TSizeZ)
+ (TSizeX >= 0) ? a_NBT.GetType(TSizeX) : -1,
+ (TSizeY >= 0) ? a_NBT.GetType(TSizeY) : -1,
+ (TSizeZ >= 0) ? a_NBT.GetType(TSizeZ) : -1
);
return false;
}