]> granicus.if.org Git - nethack/commitdiff
Limit wizgenesis to max 255 monsters
authorPasi Kallinen <paxed@alt.org>
Sat, 7 Mar 2020 22:15:28 +0000 (00:15 +0200)
committerPasi Kallinen <paxed@alt.org>
Sat, 7 Mar 2020 22:15:28 +0000 (00:15 +0200)
src/read.c

index e879c7221bcbab43e0133e23504b89b0cc11f4bc..a9feab136bb2263103f49463ce60b9adea5045d5 100644 (file)
@@ -2465,7 +2465,7 @@ struct _create_particular_data *d;
 
     /* quantity */
     if (digit(*bufp) && strcmp(bufp, "0")) {
-        d->quan = atoi(bufp);
+        d->quan = min(255, atoi(bufp));
         while (digit(*bufp))
             bufp++;
         while (*bufp == ' ')