From b3f05b309dac0b5d80e5606e6446f2c03abca8ac Mon Sep 17 00:00:00 2001 From: cracyc Date: Sun, 28 Jan 2018 16:46:41 -0600 Subject: plugins/cheatfind: fix (nw) --- plugins/cheat/cheat_simple.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/cheat') 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 -- cgit v1.2.3-70-g09d2