From ba3ea7c7d0a9ad3cd72e537e454d5c04916d5239 Mon Sep 17 00:00:00 2001
From: jdh8d <jdh8d@git.zephyr-software.com>
Date: Tue, 20 Mar 2018 20:41:36 +0000
Subject: [PATCH] type4 switch table base address detection fix

Former-commit-id: ac7d6ef86bec48ab39872fca91cd4dcbe7330df2
---
 libIRDB/test/fill_in_indtargs.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libIRDB/test/fill_in_indtargs.cpp b/libIRDB/test/fill_in_indtargs.cpp
index 378eaa4d4..fc7d2762d 100644
--- a/libIRDB/test/fill_in_indtargs.cpp
+++ b/libIRDB/test/fill_in_indtargs.cpp
@@ -1338,7 +1338,8 @@ Note: Here the operands of the add are reversed, so lookup code was not finding
 		// instruction address (and include the instruction's size, etc.
 		// but, fix_calls has already removed this oddity so we can relocate
 		// the instruction.
-		virtual_offset_t D1=strtol(disasm.getOperand(1).getString().c_str()/*Argument2.ArgMnemonic*/, NULL, 16);
+		virtual_offset_t D1=strtol(disasm.getOperand(1).getString().c_str()/*Argument2.ArgMnemonic*/, NULL, 0);
+		D1+=I5_cur->GetAddress()->GetVirtualOffset();
 
 		// find the section with the data table
 		EXEIO::section *pSec=find_section(D1,elfiop);
-- 
GitLab