mirror of
https://github.com/gwenhael-le-moine/c-urs_-toil-s.git
synced 2025-01-13 08:01:08 +01:00
-l needs a lower limit too
This commit is contained in:
parent
d794acf4a4
commit
0e22f03d41
1 changed files with 4 additions and 0 deletions
4
star.c
4
star.c
|
@ -498,6 +498,10 @@ int parse_args( int argc, char* argv[], struct options *o, struct state *s )
|
||||||
o->starting_level = atoi( optarg ) - 1;
|
o->starting_level = atoi( optarg ) - 1;
|
||||||
if ( o->starting_level > s->nb_levels ) {
|
if ( o->starting_level > s->nb_levels ) {
|
||||||
o->starting_level = s->nb_levels - 1;
|
o->starting_level = s->nb_levels - 1;
|
||||||
|
} else {
|
||||||
|
if ( o->starting_level < 0 ) {
|
||||||
|
o->starting_level = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case '?' :
|
case '?' :
|
||||||
|
|
Loading…
Reference in a new issue