Skip to content

Commit

Permalink
Fix integer overflow in cursor segment drawing
Browse files Browse the repository at this point in the history
  • Loading branch information
argilo committed Oct 5, 2022
1 parent 98b998f commit ccfdb68
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 ccfdb68

Please sign in to comment.