Merge pull request #910 from lioncash/bitwise
Core: Change a bitwise OR fail case to a logical AND success check in ActionReplay.cpp
This commit is contained in:
commit
265504bc23
|
@ -170,14 +170,20 @@ void LoadCodes(const IniFile& globalIni, const IniFile& localIni, bool forceLoad
|
|||
AREntry op;
|
||||
bool success_addr = TryParse(std::string("0x") + pieces[0], &op.cmd_addr);
|
||||
bool success_val = TryParse(std::string("0x") + pieces[1], &op.value);
|
||||
if (!(success_addr | success_val)) {
|
||||
PanicAlertT("Action Replay Error: invalid AR code line: %s", line.c_str());
|
||||
if (!success_addr) PanicAlertT("The address is invalid");
|
||||
if (!success_val) PanicAlertT("The value is invalid");
|
||||
|
||||
if (success_addr && success_val)
|
||||
{
|
||||
currentCode.ops.push_back(op);
|
||||
}
|
||||
else
|
||||
{
|
||||
currentCode.ops.push_back(op);
|
||||
PanicAlertT("Action Replay Error: invalid AR code line: %s", line.c_str());
|
||||
|
||||
if (!success_addr)
|
||||
PanicAlertT("The address is invalid");
|
||||
|
||||
if (!success_val)
|
||||
PanicAlertT("The value is invalid");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue