From dca62ace12dc68e629a2393466116154f49c8d6d Mon Sep 17 00:00:00 2001 From: Rick L Bird Date: Thu, 5 May 2011 20:41:31 -0400 Subject: [PATCH] PennMUSH 1.8.3p11 Author: captdeaf@gmail.com Date: Wed Nov 25 00:39:23 2009 +0000 lsearch() now reports invalid syntax. Discovered while investigating 143. Fixes #151 --- src/wiz.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/wiz.c b/src/wiz.c index 0077df9..c06970b 100644 --- a/src/wiz.c +++ b/src/wiz.c @@ -1749,6 +1749,13 @@ fill_search_spec(dbref player, const char *owner, int nargs, const char **args, return -1; } + /* An odd number of search classes is invalid. */ + if (nargs % 2) { + notify(player, T("Invalid search class+restriction format.")); + return -1; + } + + for (n = 0; n < nargs - 1; n += 2) { class = args[n]; restriction = args[n + 1]; -- 2.30.2