Fix xbe loading when section filesize is zero
This commit is contained in:
parent
9c4836f6c0
commit
a69553c1b6
|
@ -737,9 +737,13 @@ void *Xbe::FindSection(char *zsSectionName)
|
||||||
void* Xbe::FindSection(xboxkrnl::PXBEIMAGE_SECTION section)
|
void* Xbe::FindSection(xboxkrnl::PXBEIMAGE_SECTION section)
|
||||||
{
|
{
|
||||||
for (uint32 v = 0; v < m_Header.dwSections; v++) {
|
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)) {
|
if (m_SectionHeader[v].dwVirtualAddr > 0 && m_SectionHeader[v].dwVirtualSize > 0) {
|
||||||
return m_bzSection[v];
|
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;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue