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:
12
src/save.c
12
src/save.c
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user