From: Pasi Kallinen Date: Sat, 7 Mar 2020 22:15:28 +0000 (+0200) Subject: Limit wizgenesis to max 255 monsters X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aca240c92888e6336548692083ef4122cd381df1;p=nethack Limit wizgenesis to max 255 monsters --- diff --git a/src/read.c b/src/read.c index e879c7221..a9feab136 100644 --- a/src/read.c +++ b/src/read.c @@ -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 == ' ')