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