From 66dfe5df46dbc6eb482a382a9059af2e02feaa41 Mon Sep 17 00:00:00 2001 From: drmortalwombat <90205530+drmortalwombat@users.noreply.github.com> Date: Sun, 6 Oct 2024 12:47:53 +0200 Subject: [PATCH] Fixed constant array bounds check regression --- oscar64/InterCode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oscar64/InterCode.cpp b/oscar64/InterCode.cpp index 8b42545..3167274 100644 --- a/oscar64/InterCode.cpp +++ b/oscar64/InterCode.cpp @@ -1830,7 +1830,7 @@ void InterCodeBasicBlock::LoadConstantFold(InterInstruction* ins, InterInstructi } - if (offset >= 0 && offset * stride * (InterTypeSize[ins->mDst.mType] - 1) < lobj->mSize) + if (offset >= 0 && offset + stride * (InterTypeSize[ins->mDst.mType] - 1) < lobj->mSize) { data = lobj->mData + offset;