[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::
|
-y ycoord::
|
||||||
Set y coordinate of the window.
|
Set y coordinate of the window.
|
||||||
-d delay::
|
-d delay::
|
||||||
Close the window after <delay> seconds.
|
Close the window after <delay> seconds. Must be an integer greater than 0.
|
||||||
<message>::
|
<message>::
|
||||||
Print this message in the window.
|
Print this message in the window.
|
||||||
<icon>::
|
<icon>::
|
||||||
|
|
|
@ -144,7 +144,8 @@ main(int argc, char **argv)
|
||||||
switch(opt)
|
switch(opt)
|
||||||
{
|
{
|
||||||
case 'd':
|
case 'd':
|
||||||
delay = atoi(optarg);
|
if((delay = atoi(optarg)) <= 0)
|
||||||
|
delay = 1;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
eprint_version(PROGNAME);
|
eprint_version(PROGNAME);
|
||||||
|
|
Loading…
Reference in New Issue