Debugger: Fix calculation in MemoryView.
- The offset calculation for mapping the current point wasn't taking into account the number of bytes per hex block, causing it to be proportionally further off if one switched to 16/32/64-bit hex mode. Gets mouse selection working properly in said modes.
This commit is contained in:
@@ -677,7 +677,7 @@ MemoryView::_GetOffsetAt(BPoint point) const
|
||||
float blockWidth = (charsPerBlock * 2 + 1) * fCharWidth;
|
||||
int32 containingBlock = int32(floor(point.x / blockWidth));
|
||||
|
||||
return fHexBlocksPerLine * lineNumber
|
||||
return fHexBlocksPerLine * charsPerBlock * lineNumber
|
||||
+ containingBlock * charsPerBlock;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user