]> granicus.if.org Git - nethack/commitdiff
U423 - uninitialized memory access in dolookup
authorcohrs <cohrs>
Thu, 17 Apr 2003 03:44:02 +0000 (03:44 +0000)
committercohrs <cohrs>
Thu, 17 Apr 2003 03:44:02 +0000 (03:44 +0000)
fix a case where "cc", which is only set when looking from_screen,
in a case where from_screen is not set.

doc/fixes34.2
src/pager.c

index ea0426ae493f0c2b46af86b28d795f83b154c498..eb8c66d3ab3074b338e3c2b9e13dc8a502e09432 100644 (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
index 58d5f0a05d839f8ee51cbb18b325c9978c4f0ce7..8ba0df33b4f99f524ffd74af0b8c53d97aabd1b7 100644 (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*/
            }