Commit ed01a4d59d67637dc1e9a151d7e8e7f1230f8aed

Authored by Thomas R. Koll
1 parent 5ffa557aa4
Exists in master

Don't allow negative counts

Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff

... ... @@ -15,6 +15,9 @@
15 15  
16 16 function change_super_mario_count(what)
17 17 super_mario_count = super_mario_count + what
  18 + if super_mario_count < 0 then
  19 + super_mario_count = 0
  20 + end
18 21 -- trigger mqtt calls
19 22 end
20 23