mirror of
https://github.com/holub/mame
synced 2025-07-02 08:39:21 +03:00
plugins/cheatfind: fix address step when shift is negative (nw)
This commit is contained in:
parent
3d2b6d0d9b
commit
74ff29e228
@ -106,6 +106,9 @@ function cheatfind.startplugin()
|
|||||||
if not step or step <= 0 then
|
if not step or step <= 0 then
|
||||||
step = 1
|
step = 1
|
||||||
end
|
end
|
||||||
|
if (olddata.shift < 0) and (step < (1 << -olddata.shift)) then
|
||||||
|
step = 1 << -olddata.shift;
|
||||||
|
end
|
||||||
|
|
||||||
local cfoper = {
|
local cfoper = {
|
||||||
lt = function(a, b, val) return (a < b and val == 0) or (val > 0 and (a + val) == b) end,
|
lt = function(a, b, val) return (a < b and val == 0) or (val > 0 and (a + val) == b) end,
|
||||||
@ -192,7 +195,7 @@ function cheatfind.startplugin()
|
|||||||
oldval = old,
|
oldval = old,
|
||||||
newval = new,
|
newval = new,
|
||||||
bitmask = bitmask }
|
bitmask = bitmask }
|
||||||
ref[ret[#ret].addr] = #ret
|
ref[addr] = #ret
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -829,7 +832,7 @@ function cheatfind.startplugin()
|
|||||||
local m = { _("Page"), matchpg, 0 }
|
local m = { _("Page"), matchpg, 0 }
|
||||||
local max
|
local max
|
||||||
if matchsel == 0 then
|
if matchsel == 0 then
|
||||||
max = math.ceil(matches[#matches].count / 100)
|
max = math.ceil(matches[#matches].count / 100) - 1
|
||||||
else
|
else
|
||||||
max = #matches[#matches][matchsel]
|
max = #matches[#matches][matchsel]
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user