summaryrefslogtreecommitdiffstatshomepage
path: root/plugins/cheat
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2018-01-28 16:46:41 -0600
committer Vas Crabb <vas@vastheman.com>2018-01-29 16:22:41 +1100
commitb3f05b309dac0b5d80e5606e6446f2c03abca8ac (patch)
tree01a6cc8eec39878bfadb768f6cc1fd84306a0002 /plugins/cheat
parentd9fd4812a4f5ba989dbc50eece4c72631f7791bc (diff)
plugins/cheatfind: fix (nw)
Diffstat (limited to 'plugins/cheat')
-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