[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:
Konstantin Käfer
2016-11-09 16:53:10 +01:00
parent a9249b331a
commit 1afd993184

View File

@@ -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;