Don't allow negative counts

parent 5ffa557a
......@@ -15,6 +15,9 @@ tmr.start(timer_id)
function change_super_mario_count(what)
super_mario_count = super_mario_count + what
if super_mario_count < 0 then
super_mario_count = 0
end
-- trigger mqtt calls
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment