mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-15 08:32:22 -07:00
fix code off -> instruction idx lookup - fixes busted instruction pointer drawing in disassembly view
This commit is contained in:
@@ -69,7 +69,8 @@ dasm_inst_array_idx_from_code_off__linear_scan(DASM_InstArray *array, U64 off)
|
||||
U64 result = 0;
|
||||
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;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user