]> granicus.if.org Git - nethack/commitdiff
Something <Someone> reported. Ensure that an early panic() doesn't
authornethack.allison <nethack.allison>
Thu, 7 Mar 2002 21:50:20 +0000 (21:50 +0000)
committernethack.allison <nethack.allison>
Thu, 7 Mar 2002 21:50:20 +0000 (21:50 +0000)
cause an access violation in win32 graphical port.

win/win32/winhack.c

index c001f7ca4f2c24381432bb89fb6cf23dd6cc7e5b..0e01340d81d058404f31133a0036c7c9f0637193 100644 (file)
@@ -50,6 +50,11 @@ int APIENTRY WinMain(HINSTANCE hInstance,
        TCHAR wbuf[BUFSZ];
        char buf[BUFSZ];
 
+
+       /* ensure that we don't access violate on a panic() */
+       windowprocs.win_raw_print = mswin_raw_print;
+       windowprocs.win_raw_print_bold = mswin_raw_print_bold;
+
        /* init applicatio structure */
        _nethack_app.hApp = hInstance;
        _nethack_app.hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_NETHACKW);