From 490e4b78a7296dc2346da0a8cf071837092615d3 Mon Sep 17 00:00:00 2001 From: TryTwo Date: Sun, 29 Oct 2023 22:54:45 -0700 Subject: [PATCH] Bugfixes for PPCDebugInterface::GetMemoryAddressFromInstruction FromChars cannot return a value prefixed with 0x. Possible regex failures on rX, rY, rZ --- Source/Core/Core/Debugger/PPCDebugInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Core/Debugger/PPCDebugInterface.cpp b/Source/Core/Core/Debugger/PPCDebugInterface.cpp index bfff81b826..5f8d04d79a 100644 --- a/Source/Core/Core/Debugger/PPCDebugInterface.cpp +++ b/Source/Core/Core/Debugger/PPCDebugInterface.cpp @@ -444,7 +444,7 @@ std::string PPCDebugInterface::GetDescription(u32 address) const std::optional PPCDebugInterface::GetMemoryAddressFromInstruction(const std::string& instruction) const { - static const std::regex re(",[^r0-]*(-?)(0[xX]?[0-9a-fA-F]*|r\\d+)[^r^s]*.(p|toc|\\d+)"); + static const std::regex re(",[^r0-]*(-?)(?:0[xX])?([0-9a-fA-F]+|r\\d+)[^r^s]*.(p|toc|\\d+)"); std::smatch match; // Instructions should be identified as a load or store before using this function. This error