diff --git a/src/ripple/app/tests/Offer.test.cpp b/src/ripple/app/tests/Offer.test.cpp index ec6044a02..36167cb8b 100644 --- a/src/ripple/app/tests/Offer.test.cpp +++ b/src/ripple/app/tests/Offer.test.cpp @@ -153,7 +153,7 @@ public: { auto const closeTime = STAmountSO::soTime + timeDelta; env.close (closeTime); - *stAmountCalcSwitchover = closeTime <= STAmountSO::soTime; + *stAmountCalcSwitchover = closeTime > STAmountSO::soTime; // Will fail without the underflow fix auto expectedResult = *stAmountCalcSwitchover ? tesSUCCESS : tecPATH_PARTIAL; diff --git a/src/ripple/protocol/STAmount.h b/src/ripple/protocol/STAmount.h index 9c4d01340..e9d2e8a54 100644 --- a/src/ripple/protocol/STAmount.h +++ b/src/ripple/protocol/STAmount.h @@ -410,7 +410,7 @@ public: explicit STAmountSO(NetClock::time_point const closeTime) : saved_(*stAmountCalcSwitchover) { - *stAmountCalcSwitchover = closeTime <= soTime; + *stAmountCalcSwitchover = closeTime > soTime; } ~STAmountSO()