]> granicus.if.org Git - nethack/commit
avoid #wizrumorcheck crash on bad rumor input
authorPatR <rankin@nethack.org>
Thu, 5 Mar 2020 21:55:45 +0000 (13:55 -0800)
committerPatR <rankin@nethack.org>
Thu, 5 Mar 2020 21:55:45 +0000 (13:55 -0800)
commit32b69f5c33ffef1ded5232741f4445ea5da751fb
treea898940fc34564b6792eb74dbfadf9866fcb2201
parent998893ac32c1ffd37337ed7afe2b325fb95b499b
avoid #wizrumorcheck crash on bad rumor input

If either rumors.tru or rumors.fal was empty when makedefs made
'rumors', init_rumors() will set true_rumor_size to -1 to indicate
that rumors aren't available.  It also closes the input file, and
then #wizrumorcheck closed that again, triggering a crash in the
dlb code.

Fortune cookies and oracles work ok (just not very interesting)
when rumors aren't available.  Only the check command had trouble
with that.
doc/fixes36.6
src/rumors.c