Mercurial > hg > batmud > maputils
changeset 1809:364e5ae52398
Clamp max number of matches differently.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 30 Oct 2017 00:05:13 +0200 |
parents | 54607b2d0c8c |
children | 72850f9a91dc |
files | mapsearch.c |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mapsearch.c Mon Oct 30 00:04:54 2017 +0200 +++ b/mapsearch.c Mon Oct 30 00:05:13 2017 +0200 @@ -656,10 +656,9 @@ data[offs++] = 0; maxMatches = atoi((char *) data); - if (maxMatches < 1) - maxMatches = 1; - else - if (maxMatches > SET_MAX_MATCHES) + THMSG(0, "Requested %d matches.\n", maxMatches); + + if (maxMatches < 1 || maxMatches > SET_MAX_MATCHES) maxMatches = SET_MAX_MATCHES; // Get active map list