[core] don't initialize with Duration::min() to avoid arithmetic overflows
In FrameHistory::needsAnimation, we are computing "time - previousTime", but since previousTime was initialized to Duration::min(), we got a integer overflow, which produced invalid values.
This commit is contained in:
@@ -29,8 +29,8 @@ private:
|
||||
const AlphaImage opacities{ { 256, 1 } };
|
||||
|
||||
int16_t previousZoomIndex = 0;
|
||||
TimePoint previousTime = TimePoint::min();
|
||||
TimePoint time = TimePoint::min();
|
||||
TimePoint previousTime;
|
||||
TimePoint time;
|
||||
bool firstFrame = true;
|
||||
bool dirty = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user