From: Ari Johnson Date: Wed, 21 Feb 2007 14:29:32 +0000 (+0000) Subject: lsearch() could return garbage objects X-Git-Tag: 0.73~132 X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=0ef38fca46f80b162a488d7c426232f1d3d22600;p=cobramush.git lsearch() could return garbage objects --- 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)