diff --git a/src/libs/thorvg/tvgSwRasterTexmap.h b/src/libs/thorvg/tvgSwRasterTexmap.h index 59bebc172b..027af8994a 100644 --- a/src/libs/thorvg/tvgSwRasterTexmap.h +++ b/src/libs/thorvg/tvgSwRasterTexmap.h @@ -837,7 +837,7 @@ static AASpans* _AASpans(float ymin, float ymax, const SwImage* image, const SwB aaSpans->yEnd = yEnd; //Initialize X range - auto height = yEnd - yStart; + auto height = std::abs(yEnd - yStart); aaSpans->lines = static_cast(lv_malloc(height * sizeof(AALine))); LV_ASSERT_MALLOC(aaSpans->lines);