summaryrefslogtreecommitdiffstatshomepage
path: root/plugins/cheat/cheat_simple.lua
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2018-01-28 16:46:41 -0600
committer cracyc <cracyc@users.noreply.github.com>2018-01-28 16:46:41 -0600
commit2e3efc5eff1189f47f81fffff241a7696e9bb189 (patch)
treec75adbb7ee3fd5aff70e8f64eecf3fe5ac5c6bfd /plugins/cheat/cheat_simple.lua
parent98a6abd5335c87943a337e1c53c81eb55952a108 (diff)
plugins/cheatfind: fix (nw)
Diffstat (limited to 'plugins/cheat/cheat_simple.lua')
-rw-r--r--plugins/cheat/cheat_simple.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/cheat/cheat_simple.lua b/plugins/cheat/cheat_simple.lua
index 36067b846c6..11c63e6e642 100644
--- a/plugins/cheat/cheat_simple.lua
+++ b/plugins/cheat/cheat_simple.lua
@@ -279,7 +279,7 @@ function simple.conv_cheat(data)
local set, cputag, offset, size, val, desc = line:match('([^,]+),([^,]+),([^,]+),?([^,]*),?([^,]*),(.*)')
if set == simple.romset then
local cheat
- if cputag.sub(1,1) ~= ":" then
+ if cputag:sub(1,1) ~= ":" then
local list, name = set:match('([^/]+)/(.+)')
local func = list .. "_" .. cputag
if list and desc and codefuncs[func] then
@@ -300,12 +300,12 @@ function simple.conv_cheat(data)
else
size = 8
end
- addr = tonumber(addr, 16)
+ offset = tonumber(offset, 16)
val = tonumber(val, 16)
if manager:machine().devices[cputag] then
- cheat = prepare_ram_cheat(desc, cputag, addr, val, size)
+ cheat = prepare_ram_cheat(desc, cputag, offset, val, size)
else
- cheat = prepare_rom_cheat(desc, cputag, addr, val, size)
+ cheat = prepare_rom_cheat(desc, cputag, offset, val, size)
end
end
if cheat then