summaryrefslogtreecommitdiffstatshomepage
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/cheat/init.lua2
1 files changed, 1 insertions, 1 deletions
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)