From e92d9fd83e732f9fe05f774a8f33e7cb4e614f8d Mon Sep 17 00:00:00 2001 From: joonicks Date: Sun, 22 Apr 2018 22:00:04 +0200 Subject: [PATCH] rand --- src/toybox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/toybox.c b/src/toybox.c index d961ef5..97a5a27 100644 --- a/src/toybox.c +++ b/src/toybox.c @@ -951,7 +951,7 @@ void do_rand(COMMAND_ARGS) const ChanUser *cu; int r,min = 1,max = 100,maxaccess = -1; - if (!rest && *rest == 0) + if (!rest || *rest == 0) goto pick_randnum; if (attrtab[(uchar)*rest] & NUM)