Always use -1 for failed allocs in block allocator.

Before it used 0 and -1, confusing.
This commit is contained in:
Unknown W. Brackets committed 2013-01-18 01:38:12 -08:00
1 parent 373f1f8655
commit dcd3045cd5
4 files changed
+16 -8

No files matched your search

+2 -2
View File
@@ -32,7 +32,7 @@ u32 BlockAllocator::Alloc(u32 &size, bool fromTop, const char *tag)
// Sanity check
if (size == 0 || size > rangeSize_) {
ERROR_LOG(HLE, "Clearly bogus size: %08x - failing allocation", size);
return 0;
return -1;
}
// upalign size to grain
@@ -104,7 +104,7 @@ u32 BlockAllocator::AllocAt(u32 position, u32 size, const char *tag)
CheckBlocks();
if (size > rangeSize_) {
ERROR_LOG(HLE, "Clearly bogus size: %08x - failing allocation", size);
return 0;
return -1;
}
// upalign size to grain