diff options
Diffstat (limited to 'games/trek/dumpgame.c')
-rw-r--r-- | games/trek/dumpgame.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/games/trek/dumpgame.c b/games/trek/dumpgame.c index d386a9f..cdcee6a 100644 --- a/games/trek/dumpgame.c +++ b/games/trek/dumpgame.c @@ -35,6 +35,8 @@ static char sccsid[] = "@(#)dumpgame.c 8.1 (Berkeley) 5/31/93"; #endif /* not lint */ +#include <fcntl.h> + # include "trek.h" /*** THIS CONSTANT MUST CHANGE AS THE DATA SPACES CHANGE ***/ @@ -111,7 +113,7 @@ restartgame() register int fd; int version; - if ((fd = open("trek.dump", 0)) < 0 || + if ((fd = open("trek.dump", O_RDONLY)) < 0 || read(fd, &version, sizeof version) != sizeof version || version != VERSION || readdump(fd)) |