From 875626965959d8e269ca22175c8e1ad190696c43 Mon Sep 17 00:00:00 2001 From: Nicholas Guriev Date: Tue, 4 Jan 2022 20:15:50 +0300 Subject: [PATCH] Check border of color table while generating gradient --- src/vector/vdrawhelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vector/vdrawhelper.cpp b/src/vector/vdrawhelper.cpp index 6117a0a3..41593c86 100644 --- a/src/vector/vdrawhelper.cpp +++ b/src/vector/vdrawhelper.cpp @@ -147,7 +147,7 @@ bool VGradientCache::generateGradientColorTable(const VGradientStops &stops, colorTable[pos++] = curColor; - while (fpos <= curr->first) { + while (fpos <= curr->first && pos < size) { colorTable[pos] = colorTable[pos - 1]; pos++; fpos += incr;