summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
Diffstat (limited to 'games')
-rw-r--r--games/battlestar/com2.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/games/battlestar/com2.c b/games/battlestar/com2.c
index f8b0f38..d41d6037 100644
--- a/games/battlestar/com2.c
+++ b/games/battlestar/com2.c
@@ -51,13 +51,12 @@ wearit() /* synonyms = {sheathe, sheath} */
while(wordtype[++wordnumber] == ADJS);
while(wordnumber <= wordcount){
value = wordvalue[wordnumber];
+ if (value == -1) {
+ puts("Wear what?");
+ return (firstnumber);
+ }
for (n=0; objsht[value][n]; n++);
switch(value){
-
- case -1:
- puts("Wear what?");
- return(firstnumber);
-
default:
printf("You can't wear%s%s!\n",(objsht[value][n-1] == 's' ? " " : " a "),objsht[value]);
return(firstnumber);
OpenPOWER on IntegriCloud