Fix use of uninitialized variable
This commit is contained in:
parent
e723b7e462
commit
e6a5a22ffa
1 changed files with 3 additions and 4 deletions
|
@ -648,10 +648,9 @@ static int inven(token_t obj)
|
|||
return 2012;
|
||||
}
|
||||
|
||||
int light(token_t obj)
|
||||
int light(token_t obj, int spk)
|
||||
/* Light. Applicable only to lamp and urn. */
|
||||
{
|
||||
int spk;
|
||||
if (obj == INTRANSITIVE) {
|
||||
if (HERE(LAMP) && game.prop[LAMP] == 0 && game.limit >= 0)obj=LAMP;
|
||||
if (HERE(URN) && game.prop[URN] == 1)obj=obj*NOBJECTS+URN;
|
||||
|
@ -1079,7 +1078,7 @@ int action(FILE *input, enum speechpart part, long verb, token_t obj)
|
|||
case 3: /* UNLOC */ return lock(verb, INTRANSITIVE);
|
||||
case 4: /* NOTHI */ {RSPEAK(54); return(20012);}
|
||||
case 5: /* LOCK */ return lock(verb, INTRANSITIVE);
|
||||
case 6: /* LIGHT */ return light(INTRANSITIVE);
|
||||
case 6: /* LIGHT */ return light(INTRANSITIVE, spk);
|
||||
case 7: /* EXTIN */ return extinguish(verb, INTRANSITIVE);
|
||||
case 8: /* WAVE */ return(8000);
|
||||
case 9: /* CALM */ return(8000);
|
||||
|
@ -1120,7 +1119,7 @@ int action(FILE *input, enum speechpart part, long verb, token_t obj)
|
|||
case 3: /* UNLOC */ return lock(verb, obj);
|
||||
case 4: /* NOTHI */ {RSPEAK(54); return(20012);}
|
||||
case 5: /* LOCK */ return lock(verb, obj);
|
||||
case 6: /* LIGHT */ return light(obj);
|
||||
case 6: /* LIGHT */ return light(obj, spk);
|
||||
case 7: /* EXTI */ return extinguish(verb, obj);
|
||||
case 8: /* WAVE */ return wave(verb, obj);
|
||||
case 9: /* CALM */ {RSPEAK(spk); return 2012;}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue