summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author MooglyGuy <therealmogminer@gmail.com>2020-01-04 14:06:13 +0100
committer MooglyGuy <therealmogminer@gmail.com>2020-01-04 14:06:13 +0100
commit7486fe3ce0ee6b449829646e22c8de166bb72df4 (patch)
tree6c08886f0a16ba8b70827d3b8857e8167d17f5fc
parent52d19ef9dde53fc878338e34f5f365e4fdcdc325 (diff)
-cheat_xml: Attempt at fixing Github issue #6114. Strip the leading colon from device names as necessary in order to avoid doubling of the root colon. [Ryan Holtz, DjDiabolik]
-rw-r--r--plugins/cheat/cheat_xml.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/cheat/cheat_xml.lua b/plugins/cheat/cheat_xml.lua
index 990e5fe64d8..7f66eb4125b 100644
--- a/plugins/cheat/cheat_xml.lua
+++ b/plugins/cheat/cheat_xml.lua
@@ -76,7 +76,12 @@ function xml.conv_cheat(data)
local function convert_memref(cpu, phys, space, width, addr, rw)
-- debug expressions address spaces by index not by name
local function get_space_name(index)
- return cpu_spaces[":" .. cpu][index]
+ local prefix = cpu:sub(1,1)
+ if prefix == ":" then
+ return cpu_spaces[cpu][index]
+ else
+ return cpu_spaces[":" .. cpu][index]
+ end
end
local mod = ""
@@ -105,6 +110,12 @@ function xml.conv_cheat(data)
elseif width == "q" then
width = "u64"
end
+
+ local prefix = cpu:sub(1,1)
+ if prefix == ":" then
+ cpu = cpu:sub(2,cpu:len())
+ end
+
local cpuname = cpu:gsub(":", "_")
if space == "m" then
regions[cpuname .. space] = ":" .. cpu