diff --git a/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp b/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp index 8bc8776691..0f2123197d 100644 --- a/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp +++ b/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp @@ -209,8 +209,10 @@ MemoryView::Draw(BRect rect) PushState(); SetHighColor(B_TRANSPARENT_COLOR); SetDrawingMode(B_OP_INVERT); - float startX = drawPoint.x + fCharWidth * (targetAddress - - currentAddress); + uint32 blockAddress = uint32(targetAddress - currentAddress); + if (fHexMode != HexModeNone) + blockAddress &= ~(blockByteSize - 1); + float startX = drawPoint.x + fCharWidth * blockAddress; float endX = startX; if (fHexMode != HexModeNone) endX += fCharWidth * ((hexBlockSize - 1) / 2);