diff options
| author | Léo Lam <leolino.lam@gmail.com> | 2018-03-08 17:26:09 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-08 17:26:09 +0100 |
| commit | 1eae5fe790119459bbdfa9fbee46ea792e539c3e (patch) | |
| tree | 767ffc883760425e2dd22e97c19d72f3486d96b3 /Source | |
| parent | d29667311edf1dcacc85c9ecd06d1c1dc83b1628 (diff) | |
| parent | 4f1c0ca3e995cc478da30e1fe675392600908c1b (diff) | |
Merge pull request #6422 from sepalani/nullptr-blank
HLE: Improve format string detection heuristic
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/HLE/HLE_OS.cpp | 6 |
1 files 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))) { |
