diff --git a/TODO.txt b/TODO.txt index a5faea1456..1402c9af32 100644 --- a/TODO.txt +++ b/TODO.txt @@ -2,6 +2,8 @@ BEAST TODO -------------------------------------------------------------------------------- +- Rename HeapBlock routines to not conflict with _CRTDBG_MAP_ALLOC macros + - Design a WeakPtr / SharedPtr / SharedObject intrusive system - Implement beast::Bimap? diff --git a/modules/beast_crypto/math/beast_UnsignedInteger.h b/modules/beast_crypto/math/beast_UnsignedInteger.h index 9d4f950ea3..a7460ddb0c 100644 --- a/modules/beast_crypto/math/beast_UnsignedInteger.h +++ b/modules/beast_crypto/math/beast_UnsignedInteger.h @@ -76,10 +76,10 @@ public: template UnsignedInteger & operator= (IntegerType value) { - static_bassert (sizeof (Bytes) >= sizeof (IntegerType)); + static_bassert (Bytes >= sizeof (IntegerType)); clear (); value = ByteOrder::swapIfLittleEndian (value); - memcpy (end () - sizeof (value), &value, sizeof (value)); + memcpy (end () - sizeof (value), &value, bmin (Bytes, sizeof (value))); return *this; }