mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-28 06:55:50 +00:00
Fix undefined behavior in UnsignedIntegerCalc
This commit is contained in:
@@ -137,8 +137,8 @@ public:
|
||||
while (lo < hi)
|
||||
{
|
||||
std::swap (*lo, *hi);
|
||||
*lo++ = toNetworkByteOrder <UInt> (*lo);
|
||||
*hi-- = toNetworkByteOrder <UInt> (*hi);
|
||||
*lo = toNetworkByteOrder <UInt> (*lo); ++lo;
|
||||
*hi = toNetworkByteOrder <UInt> (*hi); --hi;
|
||||
}
|
||||
if (lo == hi)
|
||||
*lo = toNetworkByteOrder <UInt> (*lo);
|
||||
|
||||
Reference in New Issue
Block a user