Skip to content

Commit f613beb

Browse files
Melissa LeBlanc-WilliamsMelissa LeBlanc-Williams
authored andcommitted
Merge branch 'ImpulseAdventure-fillTriangle' of https://github.com/ImpulseAdventure/Adafruit-GFX-Library
2 parents 898773f + 37ac3a5 commit f613beb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Adafruit_GFX.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,8 +636,8 @@ void Adafruit_GFX::fillTriangle(int16_t x0, int16_t y0,
636636

637637
// For lower part of triangle, find scanline crossings for segments
638638
// 0-2 and 1-2. This loop is skipped if y1=y2.
639-
sa = dx12 * (y - y1);
640-
sb = dx02 * (y - y0);
639+
sa = (int32_t)dx12 * (y - y1);
640+
sb = (int32_t)dx02 * (y - y0);
641641
for(; y<=y2; y++) {
642642
a = x1 + sa / dy12;
643643
b = x0 + sb / dy02;

0 commit comments

Comments
 (0)