mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-05 21:38:40 +00: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;
|
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