mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[app/shared] CurveView: Avoid dashSize overflow in
drawHorizontalOrVerticalSegment
This commit is contained in:
committed by
LeaNumworks
parent
8e025b0823
commit
c91c2a6e3f
@@ -412,6 +412,10 @@ void CurveView::drawHorizontalOrVerticalSegment(KDContext * ctx, KDRect rect, Ax
|
||||
if (dashSize < 0) {
|
||||
// Continuous segment is equivalent to one big dash
|
||||
dashSize = end - start;
|
||||
if (dashSize < 0) {
|
||||
// end-start overflowed
|
||||
dashSize = KDCOORDINATE_MAX;
|
||||
}
|
||||
}
|
||||
KDRect lineRect = KDRectZero;
|
||||
for (KDCoordinate i = start; i < end; i += 2*dashSize) {
|
||||
|
||||
Reference in New Issue
Block a user