mirror of
https://github.com/RPCSX/xbyak.git
synced 2025-01-24 12:04:34 +00:00
avoid newSize = 0 if maxSize_ = 0
This commit is contained in:
parent
4f544f03f3
commit
4a04d4f74e
@ -503,7 +503,7 @@ protected:
|
||||
*/
|
||||
void growMemory()
|
||||
{
|
||||
const size_t newSize = maxSize_ * 2;
|
||||
const size_t newSize = (std::max<size_t>)(DEFAULT_MAX_CODE_SIZE, maxSize_ * 2);
|
||||
uint8 *newTop = alloc_->alloc(newSize);
|
||||
if (newTop == 0) throw ERR_CANT_ALLOC;
|
||||
for (size_t i = 0; i < size_; i++) newTop[i] = top_[i];
|
||||
|
Loading…
x
Reference in New Issue
Block a user