Fix awful.spawn.spawn

The C code wants a boolean as its argument, so we should give it a boolean.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2015-10-11 12:42:50 +02:00 committed by Daniel Hahler
parent da92c31826
commit 79e86d409a
1 changed files with 1 additions and 0 deletions

View File

@ -47,6 +47,7 @@ end
function spawn.spawn(cmd, sn_rules, callback) function spawn.spawn(cmd, sn_rules, callback)
if cmd and cmd ~= "" then if cmd and cmd ~= "" then
local enable_sn = (sn_rules ~= false or callback) local enable_sn = (sn_rules ~= false or callback)
enable_sn = not not enable_sn -- Force into a boolean
if not sn_rules and callback then if not sn_rules and callback then
sn_rules = {callback=callback} sn_rules = {callback=callback}
elseif callback then elseif callback then