summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/FastNBT.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/WorldStorage/FastNBT.cpp')
-rw-r--r--src/WorldStorage/FastNBT.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/WorldStorage/FastNBT.cpp b/src/WorldStorage/FastNBT.cpp
index be25fd1a4..ac9a21205 100644
--- a/src/WorldStorage/FastNBT.cpp
+++ b/src/WorldStorage/FastNBT.cpp
@@ -345,7 +345,7 @@ cFastNBTWriter::cFastNBTWriter(const AString & a_RootTagName) :
void cFastNBTWriter::BeginCompound(const AString & a_Name)
{
- if (m_CurrentStack >= MAX_STACK)
+ if (m_CurrentStack >= MAX_STACK - 1)
{
ASSERT(!"Stack overflow");
return;
@@ -376,7 +376,7 @@ void cFastNBTWriter::EndCompound(void)
void cFastNBTWriter::BeginList(const AString & a_Name, eTagType a_ChildrenType)
{
- if (m_CurrentStack >= MAX_STACK)
+ if (m_CurrentStack >= MAX_STACK - 1)
{
ASSERT(!"Stack overflow");
return;