diff --git a/common/uint128.h b/common/uint128.h index d39e133..f0610de 100644 --- a/common/uint128.h +++ b/common/uint128.h @@ -95,8 +95,8 @@ inline quint64 UInt128::lo64() const inline quint8* UInt128::toArray() const { - *(quint64*)(array_ + 0) = qToBigEndian(hi_); - *(quint64*)(array_ + 8) = qToBigEndian(lo_); + qToBigEndian(hi_, const_cast(array_ + 0)); + qToBigEndian(lo_, const_cast(array_ + 8)); return (quint8*)array_; }