From 692ff2c06f11a4cbb237595caeddfdfc0c5ed96b Mon Sep 17 00:00:00 2001 From: cracyc Date: Sun, 13 Sep 2020 19:13:38 -0500 Subject: plugin/cheat: subtract min before dividing --- plugins/cheat/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua index 418489f9525..2293e3c0605 100644 --- a/plugins/cheat/init.lua +++ b/plugins/cheat/init.lua @@ -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) -- cgit v1.2.3-70-g09d2