From daff5222267fb6d13351c72b2d8fbfea836494a8 Mon Sep 17 00:00:00 2001 From: Hop311 Date: Sun, 24 Sep 2023 21:48:41 +0100 Subject: Stopped fixed point falling for Zeno's paradox --- src/openvic-simulation/types/fixed_point/FixedPoint.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3-56-ga3b1