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