From 21fe6f1c3cdb387cdbaebe53f3f8e0449a6d8051 Mon Sep 17 00:00:00 2001 From: Ethan Lafrenais Date: Wed, 30 Oct 2024 23:36:40 -0400 Subject: [PATCH] Fix jump table entry bounds check --- src/analysis.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/analysis.cpp b/src/analysis.cpp index a3d3b8b..d5196da 100644 --- a/src/analysis.cpp +++ b/src/analysis.cpp @@ -344,7 +344,7 @@ bool N64Recomp::analyze_function(const N64Recomp::Context& context, const N64Rec } // Check if the entry is a valid address in the current function - if (jtbl_word < func.vram || jtbl_word > func.vram + func.words.size() * sizeof(func.words[0])) { + if (jtbl_word < func.vram || jtbl_word >= func.vram + func.words.size() * sizeof(func.words[0])) { // If it's not then this is the end of the jump table break; }