Skip to content

Commit

Permalink
Fix C343-42.
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrunt committed Apr 10, 2012
1 parent 06d2940 commit 5577e8d
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/trap.c
Expand Up @@ -2639,8 +2639,25 @@ struct obj *box; /* null for floor trap */
}
if (!box && burn_floor_paper(u.ux, u.uy, see_it, TRUE) && !see_it)
You("smell paper burning.");
if (is_ice(u.ux, u.uy))
if (is_ice(u.ux, u.uy)) {
struct trap *tt = (struct trap *)0;
int xbak = 0, ybak = 0;
if (!box) {
tt = t_at(u.ux, u.uy);
if (tt) {
xbak = tt->tx;
ybak = tt->ty;
tt->tx = tt->ty = 0;
} else {
impossible("dofiretrap: no tt and no box?");
}
}
melt_ice(u.ux, u.uy);
if (tt) {
tt->tx = xbak;
tt->ty = ybak;
}
}
}

STATIC_OVL void
Expand Down

0 comments on commit 5577e8d

Please sign in to comment.