Lowering the scope And cleaning up some warnings from static analysis

This commit is contained in:
NHOrus 2017-06-14 22:08:43 +03:00 committed by Eric S. Raymond
parent 7c9a0bfb36
commit 46bb20deb3
6 changed files with 11 additions and 15 deletions

View file

@ -774,11 +774,10 @@ static int quit(FILE *input)
static int read(FILE *input, token_t verb, token_t obj)
/* Read. Print stuff based on objtxt. Oyster (?) is special case. */
{
int i;
int spk = ACTSPK[verb];
if (obj == INTRANSITIVE) {
obj = 0;
for (i=1; i<=NOBJECTS; i++) {
for (int i=1; i<=NOBJECTS; i++) {
if (HERE(i) && OBJTXT[i] != 0 && game.prop[i] >= 0)
obj = obj * NOBJECTS + i;
}