]> git.pond.sub.org Git - empserver/commitdiff
fairland: Reject continent size 1
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 26 Jul 2020 11:47:44 +0000 (13:47 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 5 Jan 2021 09:41:36 +0000 (10:41 +0100)
fairland creates continents of size 1 just fine, but the newcap_script
it emits doesn't work: the newcap command requires a second wilderness
sector to the right of the first sector.

Reject continent size 1.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/util/fairland.c

index 419865eaac82cf94c6dd782a68f1d62ea3de9ba4..c94f2b47d9001abbf68de5a270574292d57965c2 100644 (file)
@@ -397,8 +397,8 @@ parse_args(int argc, char *argv[])
     }
 
     sc = atoi(argv[1]);
-    if (sc < 1) {
-       fprintf(stderr, "%s: size of continents must be > 0\n",
+    if (sc < 2) {
+       fprintf(stderr, "%s: size of continents must be > 1\n",
                program_name);
        exit(1);
     }