From: Ari Johnson Date: Mon, 18 Jul 2011 21:40:06 +0000 (-0400) Subject: Fix crash when signal(qid,TIME) is not given a third argument X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=e58e28903371ef25d505498b7072e87037fca695;p=cobramush.git Fix crash when signal(qid,TIME) is not given a third argument --- diff --git a/src/funmisc.c b/src/funmisc.c index 2f254ce..53db28d 100644 --- a/src/funmisc.c +++ b/src/funmisc.c @@ -725,7 +725,8 @@ FUNCTION(fun_signal) { if(qsig == QID_FALSE) { safe_str("#-1 INVALID SIGNAL", buff, bp); return; - } else if(qsig == QID_TIME && (!*args[2] || atoi(args[2]) < 0)) { + } else if(qsig == QID_TIME && (!args[2] || !*args[2] || + atoi(args[2]) < 0)) { safe_str("#-1 INVALID TIME ARGUMENT", buff, bp); return; }