startup problems on Unix

I found I was no longer able to start "nethack", I think due to the change
in the save file structure.  But, it looks like the Unix-specific check in
bufon() was never quite correct.  I'd have to guess we've been lucky up
until now.
This commit is contained in:
cohrs
2005-01-13 01:36:40 +00:00
parent 521c9203a5
commit 4a7c9490fe

View File

@@ -723,11 +723,13 @@ bufon(fd)
int fd;
{
#ifdef UNIX
if(bw_fd >= 0)
panic("double buffering unexpected");
bw_fd = fd;
if((bw_FILE = fdopen(fd, "w")) == 0)
panic("buffering of file %d failed", fd);
if(bw_fd != fd) {
if(bw_fd >= 0)
panic("double buffering unexpected");
bw_fd = fd;
if((bw_FILE = fdopen(fd, "w")) == 0)
panic("buffering of file %d failed", fd);
}
#endif
buffering = TRUE;
}