From d7db9dd1a850f0d022cfec7c29daa60a88b2de96 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 30 Aug 2014 12:44:50 -0400 Subject: [PATCH] Core: Change a bitwise OR fail case to a logical AND success check in ActionReplay.cpp --- Source/Core/Core/ActionReplay.cpp | 16 +++++++++++----- 1 file 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