mirror of
https://github.com/lvgl/lvgl.git
synced 2026-09-27 18:34:13 +08:00
fix(thorvg): ensure height is always positive (#9712)
This commit is contained in:
@@ -837,7 +837,7 @@ static AASpans* _AASpans(float ymin, float ymax, const SwImage* image, const SwB
|
|||||||
aaSpans->yEnd = yEnd;
|
aaSpans->yEnd = yEnd;
|
||||||
|
|
||||||
//Initialize X range
|
//Initialize X range
|
||||||
auto height = yEnd - yStart;
|
auto height = std::abs(yEnd - yStart);
|
||||||
|
|
||||||
aaSpans->lines = static_cast<AALine*>(lv_malloc(height * sizeof(AALine)));
|
aaSpans->lines = static_cast<AALine*>(lv_malloc(height * sizeof(AALine)));
|
||||||
LV_ASSERT_MALLOC(aaSpans->lines);
|
LV_ASSERT_MALLOC(aaSpans->lines);
|
||||||
|
|||||||
Reference in New Issue
Block a user