diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-05-17 08:11:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-17 08:11:53 +0200 |
commit | 18203b7e786f55871a824d29547feb895b206568 (patch) | |
tree | 3a3db57ac79f63d895ff090d1ee9d9d7cf9ff29a | |
parent | ba134d44b8a5d87cf3694dd8858ec2a495bf6c11 (diff) | |
parent | 2bbe6144ff4eb6b68b8b06144bca21bffdf1e8b5 (diff) |
Merge pull request #18946 from nemerle/fix_poolallocator_resize
Fix PoolAllocator::resize for too large p_new_size
-rw-r--r-- | core/pool_allocator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pool_allocator.cpp b/core/pool_allocator.cpp index 017586b92a..8952314212 100644 --- a/core/pool_allocator.cpp +++ b/core/pool_allocator.cpp @@ -359,7 +359,7 @@ Error PoolAllocator::resize(ID p_mem, int p_new_size) { //p_new_size = align(p_new_size) int _free = free_mem; // - static_area_size; - if ((_free + aligned(e->len)) - alloc_size < 0) { + if (uint32_t(_free + aligned(e->len)) < alloc_size) { mt_unlock(); ERR_FAIL_V(ERR_OUT_OF_MEMORY); }; |