[awesome-message] Check that delay is an integer greater than 0
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
d07ca5f76d
commit
4e73492bee
|
@ -30,7 +30,7 @@ OPTIONS
|
|||
-y ycoord::
|
||||
Set y coordinate of the window.
|
||||
-d delay::
|
||||
Close the window after <delay> seconds.
|
||||
Close the window after <delay> seconds. Must be an integer greater than 0.
|
||||
<message>::
|
||||
Print this message in the window.
|
||||
<icon>::
|
||||
|
|
|
@ -144,7 +144,8 @@ main(int argc, char **argv)
|
|||
switch(opt)
|
||||
{
|
||||
case 'd':
|
||||
delay = atoi(optarg);
|
||||
if((delay = atoi(optarg)) <= 0)
|
||||
delay = 1;
|
||||
break;
|
||||
case 'v':
|
||||
eprint_version(PROGNAME);
|
||||
|
|
Loading…
Reference in New Issue