awful.hooks: disallow 0 timer value

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-02-09 12:14:15 +01:00
parent bd6e568083
commit f24ddbd159
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ for name, hook in pairs(capi.hooks) do
_M[name] = {}
if name == 'timer' then
_M[name].register = function (time, f, runnow)
if type(time) ~= 'number' or type(f) ~= 'function' or time < 0 then
if type(time) ~= 'number' or type(f) ~= 'function' or time <= 0 then
return
end
local new_timer