mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-15 16:26:08 +00:00
feat(Core/Common): add support fmt style for ASSERT and ABORT (#10355)
* feat(Core/Common): add support fmt style for ASSERT and ABORT * correct CheckCompactArrayMaskOverflow * 1 * Update src/server/game/Spells/Spell.cpp
This commit is contained in:
@@ -193,11 +193,11 @@ void BigNumber::GetBytes(uint8* buf, size_t bufsize, bool littleEndian) const
|
||||
{
|
||||
#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
int nBytes = GetNumBytes();
|
||||
ASSERT(nBytes >= 0, "Bignum has negative number of bytes (%d).", nBytes);
|
||||
ASSERT(nBytes >= 0, "Bignum has negative number of bytes ({}).", nBytes);
|
||||
std::size_t numBytes = static_cast<std::size_t>(nBytes);
|
||||
|
||||
// too large to store
|
||||
ASSERT(numBytes <= bufsize, "Buffer of size %zu is too small to hold bignum with %zu bytes.\n", bufsize, numBytes);
|
||||
ASSERT(numBytes <= bufsize, "Buffer of size {} is too small to hold bignum with {} bytes.\n", bufsize, numBytes);
|
||||
|
||||
// If we need more bytes than length of BigNumber set the rest to 0
|
||||
if (numBytes < bufsize)
|
||||
@@ -214,7 +214,7 @@ void BigNumber::GetBytes(uint8* buf, size_t bufsize, bool littleEndian) const
|
||||
}
|
||||
#else
|
||||
int res = littleEndian ? BN_bn2lebinpad(_bn, buf, bufsize) : BN_bn2binpad(_bn, buf, bufsize);
|
||||
ASSERT(res > 0, "Buffer of size %zu is too small to hold bignum with %d bytes.\n", bufsize, BN_num_bytes(_bn));
|
||||
ASSERT(res > 0, "Buffer of size {} is too small to hold bignum with {} bytes.\n", bufsize, BN_num_bytes(_bn));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user