Skip to content

Commit

Permalink
Merge pull request #5537 from sepalani/hle-print-addr
Browse files Browse the repository at this point in the history
HLE: Improve HLE_GeneralDebugPrint detection
  • Loading branch information
shuffle2 committed Jun 5, 2017
2 parents 30918b7 + ba5cb50 commit 95ef785
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/Core/Core/HLE/HLE_OS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ void HLE_GeneralDebugPrint()
std::string report_message;

// Is gpr3 pointing to a pointer rather than an ASCII string
if (PowerPC::HostRead_U32(GPR(3)) > 0x80000000)
if (PowerPC::HostIsRAMAddress(GPR(3)) && PowerPC::HostIsRAMAddress(PowerPC::HostRead_U32(GPR(3))))
{
if (GPR(4) > 0x80000000)
if (PowerPC::HostIsRAMAddress(GPR(4)))
{
// ___blank(void* this, const char* fmt, ...);
report_message = GetStringVA(4);
Expand All @@ -48,7 +48,7 @@ void HLE_GeneralDebugPrint()
}
else
{
if (GPR(3) > 0x80000000)
if (PowerPC::HostIsRAMAddress(GPR(3)))
{
// ___blank(const char* fmt, ...);
report_message = GetStringVA();
Expand Down

0 comments on commit 95ef785

Please sign in to comment.