diff options
-rw-r--r-- | src/openvic-simulation/types/fixed_point/FixedPoint.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openvic-simulation/types/fixed_point/FixedPoint.hpp b/src/openvic-simulation/types/fixed_point/FixedPoint.hpp index 913f237..efe92a6 100644 --- a/src/openvic-simulation/types/fixed_point/FixedPoint.hpp +++ b/src/openvic-simulation/types/fixed_point/FixedPoint.hpp @@ -571,7 +571,7 @@ namespace OpenVic { int64_t ret = 0; for (int i = PRECISION - 1; i >= 0; --i) { decimal >>= 1; - if (parsed_value > decimal) { + if (parsed_value >= decimal) { parsed_value -= decimal; ret |= 1 << i; } |