From 0ef38fca46f80b162a488d7c426232f1d3d22600 Mon Sep 17 00:00:00 2001 From: Ari Johnson Date: Wed, 21 Feb 2007 14:29:32 +0000 Subject: [PATCH] lsearch() could return garbage objects --- src/wiz.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wiz.c b/src/wiz.c index f0af0d4..0eb8321 100644 --- a/src/wiz.c +++ b/src/wiz.c @@ -1992,6 +1992,8 @@ raw_search(dbref player, const char *owner, int nargs, const char **args, mush_panic(T("Couldn't allocate memory in search!")); for (n = spec.low; n <= spec.high; n++) { + if (IsGarbage(n)) + continue; if (spec.owner == ANY_OWNER && !CanSearch(player, Owner(n))) continue; if (spec.owner != ANY_OWNER && Owner(n) != spec.owner) -- 2.30.2