diff options
Diffstat (limited to 'src/script.cc')
| -rw-r--r-- | src/script.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script.cc b/src/script.cc index 4695acc..6f0c826 100644 --- a/src/script.cc +++ b/src/script.cc @@ -92,7 +92,7 @@ TReadScriptFile::~TReadScriptFile(void){ void TReadScriptFile::open(const char *FileName){ int Depth = this->RecursionDepth + 1; - if((Depth + 1) >= NARRAY(this->File)){ + if(Depth >= NARRAY(this->File)){ ::error("TReadScriptFile::open: Rekursionstiefe zu groß.\n"); throw "Recursion depth too high"; } @@ -139,7 +139,7 @@ void TReadScriptFile::close(void){ void TReadScriptFile::error(const char *Text){ int Depth = this->RecursionDepth; - ASSERT(Depth >= 0 && Depth <= NARRAY(this->File)); + ASSERT(Depth >= 0 && Depth < NARRAY(this->File)); const char *Filename = this->Filename[Depth]; if(const char *Slash = findLast(this->Filename[Depth], '/')){ |
