diff options
author | 2018-04-18 08:53:11 -0500 | |
---|---|---|
committer | 2018-04-18 08:53:11 -0500 | |
commit | 82446cd4cbbdf35ac493ad094cb9e09e3c291302 (patch) | |
tree | e70fcd51eb1c56f74ff9e5bb02f29272d387ae28 /plugins/cheat/cheat_xml.lua | |
parent | b8a56341dec80fb91cf0c3fb2c996af103f7c481 (diff) |
plugins/cheat: work around small issue in conversion (nw)
Diffstat (limited to 'plugins/cheat/cheat_xml.lua')
-rw-r--r-- | plugins/cheat/cheat_xml.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/cheat/cheat_xml.lua b/plugins/cheat/cheat_xml.lua index a14aee034cb..fa24bc30079 100644 --- a/plugins/cheat/cheat_xml.lua +++ b/plugins/cheat/cheat_xml.lua @@ -126,9 +126,10 @@ function xml.conv_cheat(data) data = data:gsub("%f[%w]lshift%f[%W]", "<<") data = data:gsub("(%w-)%+%+", "%1 = %1 + 1") data = data:gsub("%f[%w](%x+)%f[%W]", "0x%1") - data = data:gsub("([%w_:]-)%.(p?)([pmrodi3])([bwdq])@(%w+) *(=*)", convert_memref) + -- 0?x? avoids an issue where db (data region byte) is interepeted as a hex number + data = data:gsub("([%w_:]-)%.(p?)0?x?([pmrodi3])([bwdq])@(%w+) *(=*)", convert_memref) repeat - data, count = data:gsub("([%w_:]-)%.(p?)([pmrodi3])([bwdq])@(%b()) *(=*)", convert_memref) + data, count = data:gsub("([%w_:]-)%.(p?)0?x?([pmrodi3])([bwdq])@(%b()) *(=*)", convert_memref) until count == 0 if write then data = data .. ")" |