diff options
author | 2018-05-02 08:56:00 -0500 | |
---|---|---|
committer | 2018-05-02 08:57:20 -0500 | |
commit | f5191c86057fe4c1486a0f7733af0e01ef4b00b5 (patch) | |
tree | 33ccaa823b51c16abf4a58946d6bb61851e1bce2 /plugins/cheat/cheat_xml.lua | |
parent | 4badd94ad7cbef701b3788a2be079b44dbdada73 (diff) |
plugins/cheat: oops (nw)
Diffstat (limited to 'plugins/cheat/cheat_xml.lua')
-rw-r--r-- | plugins/cheat/cheat_xml.lua | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/plugins/cheat/cheat_xml.lua b/plugins/cheat/cheat_xml.lua index cb849fe0b07..990e5fe64d8 100644 --- a/plugins/cheat/cheat_xml.lua +++ b/plugins/cheat/cheat_xml.lua @@ -54,22 +54,21 @@ local function xml_parse(data) return xml_table end -local cpu_spaces = {} - -for tag, device in pairs(manager:machine().devices) do - local sp - for name, space in pairs(device.spaces) do - if not sp then - sp = {} - cpu_spaces[tag] = sp - end - sp[space.index] = space.name - end -end - function xml.conv_cheat(data) local spaces, regions, output data = xml_parse(data) + local cpu_spaces = {} + + for tag, device in pairs(manager:machine().devices) do + local sp + for name, space in pairs(device.spaces) do + if not sp then + sp = {} + cpu_spaces[tag] = sp + end + sp[space.index] = space.name + end + end local function convert_expr(data) local write = false |