mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-30 23:20:28 +00:00
Fix possible stack corruption.
This commit is contained in:
parent
51066168ac
commit
7815337204
@ -1736,13 +1736,16 @@ void LottieParserImpl::getValue(std::vector<VPointF> &v)
|
||||
|
||||
void LottieParserImpl::getValue(VPointF &pt)
|
||||
{
|
||||
float val[4];
|
||||
float val[4] = {0.f};
|
||||
int i = 0;
|
||||
|
||||
if (PeekType() == kArrayType) EnterArray();
|
||||
|
||||
while (NextArrayValue()) {
|
||||
val[i++] = GetDouble();
|
||||
const auto value = GetDouble();
|
||||
if (i < 4) {
|
||||
val[i++] = value;
|
||||
}
|
||||
}
|
||||
pt.setX(val[0]);
|
||||
pt.setY(val[1]);
|
||||
@ -1766,12 +1769,15 @@ void LottieParserImpl::getValue(float &val)
|
||||
|
||||
void LottieParserImpl::getValue(LottieColor &color)
|
||||
{
|
||||
float val[4];
|
||||
float val[4] = {0.f};
|
||||
int i = 0;
|
||||
if (PeekType() == kArrayType) EnterArray();
|
||||
|
||||
while (NextArrayValue()) {
|
||||
val[i++] = GetDouble();
|
||||
const auto value = GetDouble();
|
||||
if (i < 4) {
|
||||
val[i++] = value;
|
||||
}
|
||||
}
|
||||
color = applyReplacements(LottieColor(val[0], val[1], val[2]));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user