mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-10-13 20:39:41 -07:00
fix code off -> instruction idx lookup - fixes busted instruction pointer drawing in disassembly view
This commit is contained in:
1 parent
5778e75d66
commit
f65cf5436e
1 file changed
+2
-1
@@ -69,7 +69,8 @@ dasm_inst_array_idx_from_code_off__linear_scan(DASM_InstArray *array, U64 off)
|
|||||||
U64 result = 0;
|
U64 result = 0;
|
||||||
for(U64 idx = 0; idx < array->count; idx += 1)
|
for(U64 idx = 0; idx < array->count; idx += 1)
|
||||||
{
|
{
|
||||||
if(array->v[idx].code_off == off)
|
U64 next_off = (idx+1 < array->count ? array->v[idx+1].code_off : max_U64);
|
||||||
|
if(array->v[idx].code_off <= off && off < next_off)
|
||||||
{
|
{
|
||||||
result = idx;
|
result = idx;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in new issue
Block a user