Skip to content

Commit

Permalink
Use iterator offset instead of disassembled PC as row index
Browse files Browse the repository at this point in the history
  • Loading branch information
mortbopet committed Oct 16, 2021
1 parent 8034b20 commit 03a31f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/instructionmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ int InstructionModel::addressToRow(AInt addr) const {
auto it = disassembleRes.lower_bound(addrAdjusted);
if (it == disassembleRes.end())
return 0;
return it->first;
return std::distance(disassembleRes.begin(), it);
}
return 0;
}
Expand Down

0 comments on commit 03a31f6

Please sign in to comment.