From bbd94749f4a73543a104d4487ac190b914bf77ce Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 29 Dec 2016 11:02:21 -0500 Subject: [PATCH] ... and I guess an instant maximal simplification is also easy if length ends up being 0 --- Storage/Storage.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Storage/Storage.hpp b/Storage/Storage.hpp index bc8d5a059..ea05faebc 100644 --- a/Storage/Storage.hpp +++ b/Storage/Storage.hpp @@ -246,6 +246,12 @@ struct Time { inline void install_result(uint64_t long_length, uint64_t long_clock_rate) { // TODO: switch to appropriate values if the result is too large or small to fit, even with trimmed accuracy. + if(!long_length) + { + length = 0; + clock_rate = 1; + return; + } while(!(long_length&1) && !(long_clock_rate&1)) {