You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (templatePattern->getSection() == ptrn::Pattern::MainSectionId)
202
-
if ((evaluator->getReadOffset() - evaluator->getDataBaseAddress()) > (evaluator->getDataSize() + 1))
202
+
if ((evaluator->getReadOffset() - evaluator->getDataBaseAddress()) > (evaluator->getDataSize()))
203
203
err::E0004.throwError("Array expanded past end of the data before a null-entry was found.", "Try using a while-sized array instead to limit the size of the array.", this->getLocation());
if (outputPattern->getSection() == ptrn::Pattern::MainSectionId)
249
-
if ((evaluator->getReadOffset() - evaluator->getDataBaseAddress()) > (evaluator->getDataSize() + 1))
249
+
if ((evaluator->getReadOffset() - evaluator->getDataBaseAddress()) > (evaluator->getDataSize()))
250
250
err::E0004.throwError("Array expanded past end of the data.", { }, this->getLocation());
251
251
}
252
252
@@ -327,18 +327,20 @@ namespace pl::core::ast {
327
327
size_t patternCount = patterns.size();
328
328
329
329
if (arrayPattern->getSection() == ptrn::Pattern::MainSectionId)
330
-
if ((evaluator->getReadOffset() - evaluator->getDataBaseAddress()) > (evaluator->getDataSize() + 1))
330
+
if ((evaluator->getReadOffset() - evaluator->getDataBaseAddress()) > (evaluator->getDataSize()))
331
331
err::E0004.throwError("Array expanded past end of the data.", fmt::format("Entry {} exceeded data by {} bytes.", i, evaluator->getReadOffset() - evaluator->getDataSize()), this->getLocation());
332
332
333
333
if (!patterns.empty())
334
334
addEntries(std::move(patterns));
335
335
336
336
auto ctrlFlow = evaluator->getCurrentControlFlowStatement();
if (arrayPattern->getSection() == ptrn::Pattern::MainSectionId)
396
-
if ((evaluator->getReadOffset() - evaluator->getDataBaseAddress()) > (evaluator->getDataSize() + 1))
401
+
if ((evaluator->getReadOffset() - evaluator->getDataBaseAddress()) > (evaluator->getDataSize()))
397
402
err::E0004.throwError("Array expanded past end of the data before a null-entry was found.", "Try using a while-sized array instead to limit the size of the array.", this->getLocation());
398
403
399
404
constauto patternSize = pattern->getSize();
@@ -417,10 +422,13 @@ namespace pl::core::ast {
417
422
}
418
423
419
424
auto ctrlFlow = evaluator->getCurrentControlFlowStatement();
if (arrayPattern->getSection() == ptrn::Pattern::MainSectionId)
153
-
if ((evaluator->getReadOffset() - evaluator->getDataBaseAddress()) > (evaluator->getDataSize() + 1))
153
+
if ((evaluator->getReadOffset() - evaluator->getDataBaseAddress()) > (evaluator->getDataSize()))
154
154
err::E0004.throwError("Bitfield array expanded past end of the data.", fmt::format("Entry {} exceeded data by {} bytes.", dataIndex, evaluator->getReadOffset() - evaluator->getDataSize()), this->getLocation());
155
155
156
156
auto ctrlFlow = evaluator->getCurrentControlFlowStatement();
0 commit comments