summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorVladimir Panteleev <git@thecybershadow.net>2017-10-06 13:17:15 +0000
committerVladimir Panteleev <git@thecybershadow.net>2017-10-06 13:17:15 +0000
commit187a599b366efb624c8d5322fa7003bea0120a73 (patch)
tree8536637a852a096f59b5eb94503329750dc701f9 /Source/Core
parente691ec126fbb1e987b7d8910694347b2d38dfca7 (diff)
ActionReplay: Fix logging in Subtype_AddCode
The addition was being repeated (for logging) after it was committed to memory, thus causing bogus values to appear in the log.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/ActionReplay.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/Core/Core/ActionReplay.cpp b/Source/Core/Core/ActionReplay.cpp
index aedfc3e609..6055a7057c 100644
--- a/Source/Core/Core/ActionReplay.cpp
+++ b/Source/Core/Core/ActionReplay.cpp
@@ -448,7 +448,7 @@ static bool Subtype_AddCode(const ARAddr& addr, const u32 data)
LogInfo("8-bit Add");
LogInfo("--------");
PowerPC::HostWrite_U8(PowerPC::HostRead_U8(new_addr) + data, new_addr);
- LogInfo("Wrote %08x to address %08x", PowerPC::HostRead_U8(new_addr) + (data & 0xFF), new_addr);
+ LogInfo("Wrote %02x to address %08x", PowerPC::HostRead_U8(new_addr), new_addr);
LogInfo("--------");
break;
@@ -456,8 +456,7 @@ static bool Subtype_AddCode(const ARAddr& addr, const u32 data)
LogInfo("16-bit Add");
LogInfo("--------");
PowerPC::HostWrite_U16(PowerPC::HostRead_U16(new_addr) + data, new_addr);
- LogInfo("Wrote %08x to address %08x", PowerPC::HostRead_U16(new_addr) + (data & 0xFFFF),
- new_addr);
+ LogInfo("Wrote %04x to address %08x", PowerPC::HostRead_U16(new_addr), new_addr);
LogInfo("--------");
break;
@@ -465,7 +464,7 @@ static bool Subtype_AddCode(const ARAddr& addr, const u32 data)
LogInfo("32-bit Add");
LogInfo("--------");
PowerPC::HostWrite_U32(PowerPC::HostRead_U32(new_addr) + data, new_addr);
- LogInfo("Wrote %08x to address %08x", PowerPC::HostRead_U32(new_addr) + data, new_addr);
+ LogInfo("Wrote %08x to address %08x", PowerPC::HostRead_U32(new_addr), new_addr);
LogInfo("--------");
break;