From 06ff77458af020adfbdbfe8ecfdb35511bde362c Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Thu, 5 Feb 2026 20:33:30 -0500 Subject: [PATCH] fixup! fixup! fixup! fixup! Address review feedback from @copilot --- include/xrpl/basics/Number.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/xrpl/basics/Number.h b/include/xrpl/basics/Number.h index e0500fad57..49a7d43975 100644 --- a/include/xrpl/basics/Number.h +++ b/include/xrpl/basics/Number.h @@ -543,7 +543,7 @@ private: // * 9223372036854775808 // * 9223372036854775809 // They both end up < min, but with a leftover. If they round up, everything - // will be fine. If they don't, well need to bring them up into range. + // will be fine. If they don't, we'll need to bring them up into range. // Guard::bringIntoRange handles this situation. // The range for the mantissa when normalized. @@ -844,7 +844,7 @@ Number::normalizeToRange(T minMantissa, T maxMantissa) const // Cast mantissa to signed type first (if T is a signed type) to avoid // unsigned integer overflow when multiplying by negative sign - T signedMantissa = negative ? static_cast(-mantissa) : static_cast(mantissa); + T signedMantissa = negative ? -static_cast(mantissa) : static_cast(mantissa); return std::make_pair(signedMantissa, exponent); }