Explorar o código

NonLocalAllocator: Handle zero size allocation.

Branimir Karadžić %!s(int64=7) %!d(string=hai) anos
pai
achega
8df49a66f3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/bgfx_p.h

+ 1 - 1
src/bgfx_p.h

@@ -2539,7 +2539,7 @@ namespace bgfx
 
 		uint64_t alloc(uint32_t _size)
 		{
-			_size = bx::min(_size, 16u);
+			_size = bx::max(_size, 16u);
 
 			for (FreeList::iterator it = m_free.begin(), itEnd = m_free.end(); it != itEnd; ++it)
 			{