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

@@ -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*/
}