Skip to content

Commit

Permalink
Merge pull request #18946 from nemerle/fix_poolallocator_resize
Browse files Browse the repository at this point in the history
Fix PoolAllocator::resize for too large p_new_size
  • Loading branch information
akien-mga authored May 17, 2018
2 parents ba134d4 + 2bbe614 commit 18203b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/pool_allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down

0 comments on commit 18203b7

Please sign in to comment.