Merge pull request #1556 from ergo720/fix_xbe_loading_size_zero
Fix xbe loading when section filesize is zero
This commit is contained in:
commit
e099b0b129
|
@ -737,9 +737,13 @@ void *Xbe::FindSection(char *zsSectionName)
|
|||
void* Xbe::FindSection(xboxkrnl::PXBEIMAGE_SECTION section)
|
||||
{
|
||||
for (uint32 v = 0; v < m_Header.dwSections; v++) {
|
||||
if (m_SectionHeader[v].dwRawAddr == section->FileAddress && (m_SectionHeader[v].dwVirtualAddr > 0 && m_SectionHeader[v].dwVirtualSize > 0)) {
|
||||
return m_bzSection[v];
|
||||
if (m_SectionHeader[v].dwVirtualAddr > 0 && m_SectionHeader[v].dwVirtualSize > 0) {
|
||||
if (m_SectionHeader[v].dwRawAddr == section->FileAddress && m_SectionHeader[v].dwVirtualAddr == (uint32)(section->VirtualAddress)
|
||||
&& m_SectionHeader[v].dwVirtualSize == section->VirtualSize) {
|
||||
return m_bzSection[v];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue