[awesome-message] Check that delay is an integer greater than 0

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-03-23 20:25:21 +01:00
parent d07ca5f76d
commit 4e73492bee
2 changed files with 3 additions and 2 deletions

View File

@ -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>::

View File

@ -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);