Removed unnecessary boolean variable
This commit is contained in:
parent
9e90a2df50
commit
9a5aa06e7f
|
@ -2010,18 +2010,15 @@ void WndMain::OpenXbe(const char *x_filename)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool invalidXbe = false;
|
std::string errorMsg;
|
||||||
std::string errorMsg = "";
|
|
||||||
|
|
||||||
if (!g_Settings->m_gui.bIgnoreInvalidXbeSig && !m_Xbe->CheckSignature()) {
|
if (!g_Settings->m_gui.bIgnoreInvalidXbeSig && !m_Xbe->CheckSignature()) {
|
||||||
invalidXbe = true;
|
|
||||||
errorMsg += "- XBE signature check failed!\n";
|
errorMsg += "- XBE signature check failed!\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!g_Settings->m_gui.bIgnoreInvalidXbeSec) {
|
if (!g_Settings->m_gui.bIgnoreInvalidXbeSec) {
|
||||||
for (uint32_t sectionIndex = 0; sectionIndex < m_Xbe->m_Header.dwSections; sectionIndex++) {
|
for (uint32_t sectionIndex = 0; sectionIndex < m_Xbe->m_Header.dwSections; sectionIndex++) {
|
||||||
if (!m_Xbe->CheckSectionIntegrity(sectionIndex)) {
|
if (!m_Xbe->CheckSectionIntegrity(sectionIndex)) {
|
||||||
invalidXbe = true;
|
|
||||||
errorMsg += "- One or more XBE section(s) are corrupted!\n";
|
errorMsg += "- One or more XBE section(s) are corrupted!\n";
|
||||||
|
|
||||||
// if we find a corrupted section, we won't bother checking the remaining sections since we know
|
// if we find a corrupted section, we won't bother checking the remaining sections since we know
|
||||||
|
@ -2031,7 +2028,7 @@ void WndMain::OpenXbe(const char *x_filename)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (invalidXbe) {
|
if (!errorMsg.empty()) {
|
||||||
errorMsg += ("\nThis is dangerous, as maliciously modified Xbox applications could take control of your system."
|
errorMsg += ("\nThis is dangerous, as maliciously modified Xbox applications could take control of your system."
|
||||||
"\nPlease do not report issues for this application.\n"
|
"\nPlease do not report issues for this application.\n"
|
||||||
"\nAre you sure you want to continue?");
|
"\nAre you sure you want to continue?");
|
||||||
|
|
Loading…
Reference in New Issue