util.timer: Fix corner case of timer not repeating if it returns <= 0

remotes/origin/0.11
Matthew Wild 15 years ago
parent 662e7a289f
commit 3f7fda7079
  1. 5
      util/timer.lua

@ -32,7 +32,10 @@ if not event then
if delay >= current_time then
t_insert(new_data, {delay, func});
else
func();
local r = func();
if r and type(r) == "number" then
return _add_task(r, func);
end
end
end

Loading…
Cancel
Save