Merge pull request #1977 from KLayout/bugfix/issue-1976

Fixed issue #1976 (crash on cross mode, lw > 1 and oversampling)
This commit is contained in:
Matthias Köfferlein 2025-01-22 12:02:15 +01:00 committed by GitHub
commit 71a943a91c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 4 deletions

View File

@ -1745,13 +1745,21 @@ LayoutViewBase::icon_for_layer (const LayerPropertiesConstIterator &iter, unsign
frame.fill (i, w - 1 - p0, w - p0);
frame.fill (i, w - 1 - (wp - p1), w - (wp - p1));
frame.fill (i, w - 1 - p0x, w - p0x);
frame.fill (i, w - 1 - (wp - p1x), w - (wp - p1x));
if ((unsigned int) p0x < w) {
frame.fill (i, w - 1 - p0x, w - p0x);
}
if ((unsigned int) (wp - p1x) < w) {
frame.fill (i, w - 1 - (wp - p1x), w - (wp - p1x));
}
while (d < ddx) {
d += ddy;
frame.fill (i, w - 1 - p0x, w - p0x);
frame.fill (i, w - 1 - (wp - p1x), w - (wp - p1x));
if ((unsigned int) p0x < w) {
frame.fill (i, w - 1 - p0x, w - p0x);
}
if ((unsigned int) (wp - p1x) < w) {
frame.fill (i, w - 1 - (wp - p1x), w - (wp - p1x));
}
++p0x;
++p1x;
}