Mercurial > hg > early-roguelike
comparison srogue/main.c @ 226:b922f66acf4d
Super-Rogue: begin fixing restore failures on Windows.
Start to solve the problem by calling md_init() to set _fmode. Now
reading a savefile only triggers an error handler and causes an abort
instead of a crash.
author | John "Elwin" Edwards |
---|---|
date | Thu, 03 Mar 2016 21:30:38 -0500 |
parents | 94a0d9dd5ce1 |
children | 3d4252fa2ed3 |
comparison
equal
deleted
inserted
replaced
225:4f6e056438eb | 226:b922f66acf4d |
---|---|
50 char *getpass(), *xcrypt(), *strrchr(); | 50 char *getpass(), *xcrypt(), *strrchr(); |
51 int lowtime; | 51 int lowtime; |
52 time_t now; | 52 time_t now; |
53 char *homedir = roguehome(); | 53 char *homedir = roguehome(); |
54 | 54 |
55 #ifdef __DJGPP__ | 55 md_init(); |
56 _fmode = O_BINARY; | |
57 #endif | |
58 | 56 |
59 if (homedir == NULL) | 57 if (homedir == NULL) |
60 homedir = ""; | 58 homedir = ""; |
61 | 59 |
62 playuid = md_getuid(); | 60 playuid = md_getuid(); |