From dd4d31cd315b748650b1e7899d8526ba1b4527e1 Mon Sep 17 00:00:00 2001 From: hubertf Date: Mon, 24 Aug 1998 00:19:25 +0000 Subject: [PATCH] Initialize return-value correctly as pointed out in PR 6007 by Joseph Myers . --- battlestar/com3.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/battlestar/com3.c b/battlestar/com3.c index 77ab3db8..d508d5e2 100644 --- a/battlestar/com3.c +++ b/battlestar/com3.c @@ -1,4 +1,4 @@ -/* $NetBSD: com3.c,v 1.6 1997/10/11 02:07:02 lukem Exp $ */ +/* $NetBSD: com3.c,v 1.7 1998/08/24 00:19:25 hubertf Exp $ */ /* * Copyright (c) 1983, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)com3.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: com3.c,v 1.6 1997/10/11 02:07:02 lukem Exp $"); +__RCSID("$NetBSD: com3.c,v 1.7 1998/08/24 00:19:25 hubertf Exp $"); #endif #endif /* not lint */ @@ -196,11 +196,10 @@ shoot() int firstnumber, value; int n; - firstnumber = 0; + firstnumber = wordnumber; if (!testbit(inven, LASER)) puts("You aren't holding a blaster."); else { - firstnumber = wordnumber; while (wordtype[++wordnumber] == ADJS); while (wordnumber <= wordcount && wordtype[wordnumber] == OBJECT) { value = wordvalue[wordnumber]; -- 2.47.1