From 278f679bb1355171919df556b8b7614847cc056c Mon Sep 17 00:00:00 2001 From: seelabs Date: Wed, 27 Jan 2016 16:35:22 -0500 Subject: [PATCH] Enable underflow fix after specified date --- src/ripple/app/tests/Offer.test.cpp | 2 +- src/ripple/protocol/STAmount.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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()