2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 21:07:42 +00:00

Allocation bounds fix, Space Warp 0.5 bias

This commit is contained in:
Jack Andersen
2016-07-29 17:53:45 -10:00
parent 0ddf4dc426
commit 03671ce5e1
2 changed files with 6 additions and 5 deletions

View File

@@ -416,11 +416,12 @@ void ProjectResourceFactoryBase::AsyncTask::CookComplete()
}
/* Ready for buffer transaction at this point */
x14_resSize = std::min(s32(x14_resSize), std::max(0, s32(fr.length()) - s32(x14_resOffset)));
x10_loadBuffer.reset(new u8[x14_resSize]);
u32 availSz = std::max(0, s32(fr.length()) - s32(x14_resOffset));
u32 sz = std::min(x14_resSize, availSz);
x10_loadBuffer.reset(new u8[sz]);
m_bufTransaction = m_parent.m_clientProc.addBufferTransaction(m_cookedPath,
x10_loadBuffer.get(),
x14_resSize, x14_resOffset);
sz, x14_resOffset);
}
bool ProjectResourceFactoryBase::AsyncTask::AsyncPump()