mirror of
https://github.com/gwenhael-le-moine/c-urs_-toil-s.git
synced 2024-12-26 09:58:48 +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;
|
||||
if ( o->starting_level > s->nb_levels ) {
|
||||
o->starting_level = s->nb_levels - 1;
|
||||
} else {
|
||||
if ( o->starting_level < 0 ) {
|
||||
o->starting_level = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case '?' :
|
||||
|
|
Loading…
Reference in a new issue