diff options
| author | Lioncash <mathew1800@gmail.com> | 2014-08-30 12:44:50 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2014-08-30 15:17:15 -0400 |
| commit | d7db9dd1a850f0d022cfec7c29daa60a88b2de96 (patch) | |
| tree | dda430f2bc50558f17de40b799319e021646a34f /Source/Core | |
| parent | af79d28cfa973583d0d0bec2f7190417a5d739e4 (diff) | |
Core: Change a bitwise OR fail case to a logical AND success check in
ActionReplay.cpp
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/ActionReplay.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Source/Core/Core/ActionReplay.cpp b/Source/Core/Core/ActionReplay.cpp index 657fa7c987..400f510a46 100644 --- a/Source/Core/Core/ActionReplay.cpp +++ b/Source/Core/Core/ActionReplay.cpp @@ -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 |
