ensuring both arguments to max are the same type
This commit is contained in:
Родитель
408df21432
Коммит
351bd72f09
|
@ -358,7 +358,7 @@ void JS::BigInt::allocate(uint lgGrossSize)
|
|||
FREE_DTOA_LOCK(0);
|
||||
} else {
|
||||
FREE_DTOA_LOCK(0);
|
||||
w = static_cast<uint32 *>(STD::malloc(max(grossSize*sizeof(uint32), uint32(sizeof(uint32 *)))));
|
||||
w = static_cast<uint32 *>(STD::malloc(max(uint32(grossSize*sizeof(uint32)), uint32(sizeof(uint32 *)))));
|
||||
if (!w) {
|
||||
std::bad_alloc outOfMemory;
|
||||
throw outOfMemory;
|
||||
|
|
|
@ -358,7 +358,7 @@ void JS::BigInt::allocate(uint lgGrossSize)
|
|||
FREE_DTOA_LOCK(0);
|
||||
} else {
|
||||
FREE_DTOA_LOCK(0);
|
||||
w = static_cast<uint32 *>(STD::malloc(max(grossSize*sizeof(uint32), uint32(sizeof(uint32 *)))));
|
||||
w = static_cast<uint32 *>(STD::malloc(max(uint32(grossSize*sizeof(uint32)), uint32(sizeof(uint32 *)))));
|
||||
if (!w) {
|
||||
std::bad_alloc outOfMemory;
|
||||
throw outOfMemory;
|
||||
|
|
Загрузка…
Ссылка в новой задаче