mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-29 12:50:28 +00:00
Ensures relative_exponent
s less than or equal to -32 don't overflow.
This commit is contained in:
parent
81b57ecf7c
commit
39d7e3c62c
@ -264,7 +264,7 @@ struct Time {
|
|||||||
// If the mantissa is negative and its absolute value fits within a 64-bit integer,
|
// If the mantissa is negative and its absolute value fits within a 64-bit integer,
|
||||||
// just load up.
|
// just load up.
|
||||||
if(relative_exponent <= 0 && relative_exponent > -64) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user