From aca240c92888e6336548692083ef4122cd381df1 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 8 Mar 2020 00:15:28 +0200 Subject: [PATCH] Limit wizgenesis to max 255 monsters --- src/read.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 == ' ')