From 4f1c0ca3e995cc478da30e1fe675392600908c1b Mon Sep 17 00:00:00 2001 From: Sepalani Date: Tue, 6 Mar 2018 21:21:56 +0400 Subject: [PATCH] HLE: Improve format string detection heuristic --- Source/Core/Core/HLE/HLE_OS.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/HLE/HLE_OS.cpp b/Source/Core/Core/HLE/HLE_OS.cpp index 1d4af91ff8..f0b4bead98 100644 --- a/Source/Core/Core/HLE/HLE_OS.cpp +++ b/Source/Core/Core/HLE/HLE_OS.cpp @@ -47,8 +47,10 @@ void HLE_GeneralDebugPrint(ParameterType parameter_type) { std::string report_message; - // Is gpr3 pointing to a pointer rather than an ASCII string - if (PowerPC::HostIsRAMAddress(GPR(3)) && PowerPC::HostIsRAMAddress(PowerPC::HostRead_U32(GPR(3)))) + // Is gpr3 pointing to a pointer (including nullptr) rather than an ASCII string + if (PowerPC::HostIsRAMAddress(GPR(3)) && + (PowerPC::HostIsRAMAddress(PowerPC::HostRead_U32(GPR(3))) || + PowerPC::HostRead_U32(GPR(3)) == 0)) { if (PowerPC::HostIsRAMAddress(GPR(4))) {