diff options
author | christos <christos@NetBSD.org> | 2001-06-02 17:30:28 +0000 |
---|---|---|
committer | christos <christos@NetBSD.org> | 2001-06-02 17:30:28 +0000 |
commit | f47771ea66c0cafa6abdf85d6e629fbf84aaa3fe (patch) | |
tree | d6c5a41ea66f48fb76ac3cd90f0a56a06f4d1b1a /battlestar | |
parent | 414879d0a7308e5952a3fc8655d6466ab96da6a1 (diff) | |
download | bsdgames-darwin-f47771ea66c0cafa6abdf85d6e629fbf84aaa3fe.tar.gz bsdgames-darwin-f47771ea66c0cafa6abdf85d6e629fbf84aaa3fe.tar.zst bsdgames-darwin-f47771ea66c0cafa6abdf85d6e629fbf84aaa3fe.zip |
don't deref -1.
Diffstat (limited to 'battlestar')
-rw-r--r-- | battlestar/com2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/battlestar/com2.c b/battlestar/com2.c index 69334568..55b86af9 100644 --- a/battlestar/com2.c +++ b/battlestar/com2.c @@ -1,4 +1,4 @@ -/* $NetBSD: com2.c,v 1.21 2000/09/25 19:37:58 jsm Exp $ */ +/* $NetBSD: com2.c,v 1.22 2001/06/02 17:30:28 christos Exp $ */ /* * Copyright (c) 1983, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)com2.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: com2.c,v 1.21 2000/09/25 19:37:58 jsm Exp $"); +__RCSID("$NetBSD: com2.c,v 1.22 2001/06/02 17:30:28 christos Exp $"); #endif #endif /* not lint */ @@ -54,7 +54,7 @@ wearit() while (wordnumber <= wordcount && (wordtype[wordnumber] == OBJECT || wordtype[wordnumber] == NOUNS) && wordvalue[wordnumber] != DOOR) { value = wordvalue[wordnumber]; - if (objsht[value] == NULL) + if (value >= 0 && objsht[value] == NULL) break; switch (value) { |