U423 - uninitialized memory access in dolookup

fix a case where "cc", which is only set when looking from_screen,
in a case where from_screen is not set.
This commit is contained in:
cohrs
2003-04-17 03:44:02 +00:00
parent d4c9baa644
commit 3d7d2f569e
2 changed files with 2 additions and 1 deletions

View File

@@ -42,6 +42,7 @@ avoid impossible after eating the object the hero is hiding under
failed attempt to eat floor gold while polymorphed would lose the gold
running that stops for closed doors should stop at mimics mimicking closed doors
allow wishing for magenta potions (ignoring the rank name 'mage')
fix an uninitialized memory access in non-quick dolookup
Platform- and/or Interface-Specific Fixes

View File

@@ -674,7 +674,7 @@ do_look(quick)
}
/* Kludge: warning trumps boulders on the display.
Reveal the boulder too or player can get confused */
if (sobj_at(BOULDER, cc.x, cc.y))
if (from_screen && sobj_at(BOULDER, cc.x, cc.y))
Strcat(out_str, " co-located with a boulder");
break; /* out of for loop*/
}