plugin/cheat: subtract min before dividing

This commit is contained in:
cracyc 2020-09-13 19:13:38 -05:00
parent 35bfe62b59
commit 692ff2c06f

View File

@ -569,7 +569,7 @@ function cheat.startplugin()
end
cheat.set_index = set_index;
cheat.set_value = function(cheat, value)
local idx = (value / cheat.parameter.step) + 1
local idx = ((value - cheat.parameter.min) / cheat.parameter.step) + 1
local chg = false
if math.integer(idx) == idx then
idx, chg = cheat:set_index(idx)