mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
lottie: correct the array reserved size
The color input will contain at least colorStops.count * 4 elements (not including alpha). Since the alpha offset values don't have to much colorStops, estimation is used.
This commit is contained in:
parent
78285e1cfd
commit
d9bbd433e8
1 changed files with 1 additions and 1 deletions
|
@ -254,7 +254,7 @@ void LottieParser::getValue(ColorStop& color)
|
|||
{
|
||||
if (peekType() == kArrayType) enterArray();
|
||||
|
||||
if (!color.input) color.input = new Array<float>(static_cast<LottieGradient*>(context.parent)->colorStops.count);
|
||||
if (!color.input) color.input = new Array<float>(static_cast<LottieGradient*>(context.parent)->colorStops.count * 6);
|
||||
else color.input->clear();
|
||||
|
||||
while (nextArrayValue()) color.input->push(getFloat());
|
||||
|
|
Loading…
Add table
Reference in a new issue