]> granicus.if.org Git - nethack/commit
hangup paranoia (trunk only)
authornethack.rankin <nethack.rankin>
Sat, 3 Feb 2007 01:59:49 +0000 (01:59 +0000)
committernethack.rankin <nethack.rankin>
Sat, 3 Feb 2007 01:59:49 +0000 (01:59 +0000)
commitdda8161ece15c69bb222e5c72ab8e5479a7eb8cc
treebcc1630ee61b18cdff8a1a861c1b1cadbbe40f8e
parent47f052e7b8a1e65c04245b3f8943170ba4c3d25d
hangup paranoia (trunk only)

     If nhwindows_hangup() were to get called a second time, it would have
saved hup_exit_nhwindows() as the previous interface's shutdown routine.
Then if/when exit_nhwindows() gets called, hup_exit_nhwindows() would
have called itself with uncontrolled recursion.  So guard against that by
preventing the hangup shutdown routine from ever being saved as previous
interface shutdown routine.

     Also, avoid the exit_windows macro when using it as a pointer rather
than for a function call, since pre-ANSI compilers might be confused by
its expansion.
src/windows.c