Skip to content

Commit

Permalink
Merge pull request #210 from argilo/fix-cursor-overflow
Browse files Browse the repository at this point in the history
Fix integer overflow in cursor segment drawing
  • Loading branch information
miek authored Oct 5, 2022
2 parents 98b998f + ccfdb68 commit 684158d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cursors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void Cursors::paintFront(QPainter &painter, QRect &rect, range_t<size_t> sampleR

// Draw vertical edges for individual segments
painter.setPen(QPen(Qt::gray, 1, Qt::DashLine));
for (int i = 1; i < segmentCount; i++) {
for (long i = 1; i < segmentCount; i++) {
int pos = minCursor->pos() + (i * cursorRect.width() / segmentCount);
painter.drawLine(pos, rect.top(), pos, rect.bottom());
}
Expand Down

0 comments on commit 684158d

Please sign in to comment.