-l needs a lower limit too

This commit is contained in:
Gwenhael Le Moine 2011-07-03 22:24:05 +02:00
parent d794acf4a4
commit 0e22f03d41

4
star.c
View file

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