From 0a04293f23d9c3cc2a057c9130c71832d2375e06 Mon Sep 17 00:00:00 2001 From: NHOrus Date: Thu, 6 Jul 2017 18:18:31 +0300 Subject: [PATCH 1/1] Prevent multiple assigment to game.bonus in blast --- actions.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/actions.c b/actions.c index 2c28663..ab3ccda 100644 --- a/actions.c +++ b/actions.c @@ -230,15 +230,16 @@ static int bigwords(long id) static void blast(void) /* Blast. No effect unless you've got dynamite, which is a neat trick! */ { - if (game.prop[ROD2] < 0 || + if (game.prop[ROD2] == STATE_NOTFOUND || !game.closed) rspeak(REQUIRES_DYNAMITE); else { - game.bonus = VICTORY_MESSAGE; - if (game.loc == LOC_NE) - game.bonus = DEFEAT_MESSAGE; if (HERE(ROD2)) game.bonus = SPLATTER_MESSAGE; + else if (game.loc == LOC_NE) + game.bonus = DEFEAT_MESSAGE; + else + game.bonus = VICTORY_MESSAGE; rspeak(game.bonus); terminate(endgame); } -- 2.31.1