win32tty hangs if you ^C at "Who are you?"

From Newsgroups: rec.games.roguelike.nethack :
> <email deleted>
> Subject: question for windows tty users
>
> I am trying to hunt down a bug, and want to know if I have
> encountered another one of those bizarre "features" that only
> occur on my computer (I seem to get a lot of them).
>
> I can reproduce this bug, or whatever it is, in the official
> Windows binary like this: Start the tty version of NetHack by
> double clicking on the program. You won't see the bug if you
> start it from the command line. When the game asks, "Who are
> you?" press ^C. NetHack will respond with "^C abort. Hit
> <Enter> to end," and then it hangs. Pressing Enter does
> nothing, and the program does not end.
>
> Can anybody else reproduce this behaviour? Thanks in advance.
>
> -- <Someone>
This commit is contained in:
nethack.allison
2003-10-21 14:17:04 +00:00
parent 2d55849bb1
commit d07568164d
3 changed files with 12 additions and 6 deletions
+3 -3
View File
@@ -58,6 +58,8 @@ INPUT_RECORD ir;
int GUILaunched;
static BOOL FDECL(CtrlHandler, (DWORD));
extern boolean getreturn_enabled; /* from sys/share/pcsys.c */
/* dynamic keystroke handling .DLL support */
typedef int (__stdcall * PROCESS_KEYSTROKE)(
HANDLE,
@@ -207,8 +209,6 @@ tty_end_screen()
FlushConsoleInputBuffer(hConIn);
}
extern boolean getreturn_disable; /* from sys/share/pcsys.c */
static BOOL CtrlHandler(ctrltype)
DWORD ctrltype;
{
@@ -219,7 +219,7 @@ DWORD ctrltype;
case CTRL_CLOSE_EVENT:
case CTRL_LOGOFF_EVENT:
case CTRL_SHUTDOWN_EVENT:
getreturn_disable = TRUE;
getreturn_enabled = FALSE;
#ifndef NOSAVEONHANGUP
hangup(0);
#endif