From: nethack.allison Date: Mon, 2 Oct 2006 03:43:31 +0000 (+0000) Subject: win32 X-Git-Tag: MOVE2GIT~865 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=58a1828f188506b5d03591cb5a7db24895f62fa8;p=nethack win32 The new runtime has parameter checking, and this one would cause NetHack pop up a dialog and die. --- diff --git a/src/files.c b/src/files.c index 75f276c98..457706c25 100644 --- a/src/files.c +++ b/src/files.c @@ -629,7 +629,8 @@ really_close() lftrack.nethack_thinks_it_is_open = FALSE; lftrack.fd = -1; lftrack.oflag = 0; - (void)_close(fd); + if (fd != -1) + (void)_close(fd); return; }