From: Timo Kokkonen Date: Sat, 10 Apr 2010 11:49:31 +0000 (+0300) Subject: main.c: Do not allow creating zero planets X-Git-Url: http://git.itanic.dy.fi/?p=sdl-planets;a=commitdiff_plain;h=22c52003c8ae156330c5b1df31c5464ed8a04e77 main.c: Do not allow creating zero planets Signed-off-by: Timo Kokkonen --- diff --git a/main.c b/main.c index be927c7..88efd21 100644 --- a/main.c +++ b/main.c @@ -327,6 +327,10 @@ int main(int argc, char *argv[]) if (argc >= 2) planets = atoi(argv[1]); + if (planets < 1) + planets = 1; + + if (argc >= 3) total_mass = atof(argv[2]);