sw_engine fill: fixing the infinite loop condition

Fixed in the fillFetchLinear() function.
This commit is contained in:
Mira Grudzinska 2021-02-25 23:43:26 +01:00 committed by Hermet Park
parent d03db583e5
commit 07e6c476a8

View file

@ -257,7 +257,8 @@ void fillFetchLinear(const SwFill* fill, uint32_t* dst, uint32_t y, uint32_t x,
} }
//we have to fallback to float math //we have to fallback to float math
} else { } else {
while (dst < dst + len) { uint32_t counter = 0;
while (counter++ < len) {
*dst = _pixel(fill, t / GRADIENT_STOP_SIZE); *dst = _pixel(fill, t / GRADIENT_STOP_SIZE);
++dst; ++dst;
t += inc; t += inc;