Merge pull request #363 from LukeUsher/memorymanager-tweaking

Fix gamepad sample (and potentially others)
This commit is contained in:
Luke Usher 2017-04-12 21:24:56 +01:00 committed by GitHub
commit 91ce16c023
1 changed files with 2 additions and 2 deletions

View File

@ -274,8 +274,8 @@ size_t MemoryManager::QueryAllocationSize(void* addr)
EnterCriticalSection(&m_CriticalSection);
TypedMemoryBlock *info = FindContainingTypedMemoryBlock(addr);
if (info != nullptr) {
// Return the remaining size in this block
ret = info->block.size - ((size_t)addr - (size_t)info->block.addr);
// Return the total size in this block
ret = info->block.size;// -((size_t)addr - (size_t)info->block.addr);
}
else {
#if 1 // TODO : Only log this in DEBUG builds (as a failure is already indicated by a null result)?