On May 15, 2011, at 16:08, g...@crawl.develz.org wrote: > Author: Adam Borowski <kilob...@angband.pl> > Date: Sun May 15 16:05:36 2011 +0200 > > Plug the trap crash. > > This is a WRONG fix as it leaks information, but we need to make CDO > playable. > --- a/crawl-ref/source/travel.cc > +++ b/crawl-ref/source/travel.cc > @@ -408,7 +408,7 @@ bool is_travelsafe_square(const coord_def& c, bool > ignore_hostile, > if (!ignore_danger && is_excluded(c) && !is_stair_exclusion(c)) > return (false); > > - if (is_trap(c) && find_trap(c)->is_safe()) > + if (is_trap(c) && find_trap(c) && find_trap(c)->is_safe()) > return true; >
I think adding a check for feat_is_trap(env.map_knowledge(c).feat()) should make sure no information is leaked. (Ideally, map_knowledge would have enough information to determine whether a trap is safe, but I think that's not the case at the moment.) Cheers Robert ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Crawl-ref-discuss mailing list Crawl-ref-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/crawl-ref-discuss