From 39d7e3c62ca19915ad5065f9cb83328457707207 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Fri, 26 Jul 2019 22:19:40 -0400 Subject: [PATCH] Ensures `relative_exponent`s less than or equal to -32 don't overflow. --- Storage/Storage.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage.hpp b/Storage/Storage.hpp index 31714b545..01f7129a8 100644 --- a/Storage/Storage.hpp +++ b/Storage/Storage.hpp @@ -264,7 +264,7 @@ struct Time { // If the mantissa is negative and its absolute value fits within a 64-bit integer, // just load up. if(relative_exponent <= 0 && relative_exponent > -64) { - install_result(loaded_mantissa, uint64_t(1 << -relative_exponent)); + install_result(loaded_mantissa, uint64_t(1) << -relative_exponent); return; }