mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2026-04-17 14:05:49 -05:00
Return empty MemorySegmentInfo when attempting a out of bounce access
This commit is contained in:
parent
32d6df4ec2
commit
6a3e051827
|
|
@ -64,6 +64,7 @@ HeapMemoryFixedSizePool::operator bool() const {
|
|||
HeapMemoryFixedSizePool::MemorySegmentInfo HeapMemoryFixedSizePool::operator[](const int idx) const {
|
||||
if (idx < 0 || idx >= static_cast<int>(mSegmentInfos.size())) {
|
||||
DEBUG_FUNCTION_LINE_ERR("Out of bounce access (tried to access index %d; size is %d", idx, mSegmentInfos.size());
|
||||
return {nullptr, 0};
|
||||
}
|
||||
return mSegmentInfos[idx];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user