From e4c2049975c2359c7eb0fa0063e494e90054bac8 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 10 Jan 2021 22:52:12 +0100 Subject: [PATCH] Fixed off-by-one error for array bound check --- source/lang/evaluator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lang/evaluator.cpp b/source/lang/evaluator.cpp index eabb2cdb4..22427d18c 100644 --- a/source/lang/evaluator.cpp +++ b/source/lang/evaluator.cpp @@ -621,7 +621,7 @@ namespace hex::lang { entries.push_back(entry); - if (this->m_currOffset >= this->m_provider->getActualSize()) + if (this->m_currOffset > this->m_provider->getActualSize()) throwEvaluateError("array exceeds size of file"); }