From a03c2e89e7099b0a782af6c577e3989295b03708 Mon Sep 17 00:00:00 2001 From: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Thu, 12 Sep 2024 14:33:49 +0300 Subject: [PATCH] Fix SearchBlock. --- PowerAnalyse/function.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PowerAnalyse/function.cpp b/PowerAnalyse/function.cpp index bd986a9..cff1e05 100644 --- a/PowerAnalyse/function.cpp +++ b/PowerAnalyse/function.cpp @@ -16,9 +16,9 @@ size_t Function::SearchBlock(size_t address) const { const auto& block = blocks[i]; const auto begin = base + block.base; - const auto end = begin + size; + const auto end = begin + block.size; - if (address >= begin && address <= end) + if (address >= begin && address < end) { return i; }