Don't autosave on segfault or after death
This commit is contained in:
parent
2ff3dc0619
commit
67250dfc74
2 changed files with 8 additions and 1 deletions
|
|
@ -252,7 +252,9 @@ md_onsignal_autosave(void)
|
|||
signal(SIGBUS, auto_save);
|
||||
#endif
|
||||
#ifdef SIGSEGV
|
||||
signal(SIGSEGV, auto_save);
|
||||
/* If there's a segfault, the game state is probably trashed
|
||||
and there's no point saving it. */
|
||||
signal(SIGSEGV, SIG_DFL);
|
||||
#endif
|
||||
#ifdef SIGSYS
|
||||
signal(SIGSYS, auto_save);
|
||||
|
|
|
|||
|
|
@ -55,6 +55,11 @@ death(int monst)
|
|||
time_t date;
|
||||
char buf[80];
|
||||
|
||||
/* Don't autosave dead games. It would be a good idea to autosave a
|
||||
game that is between death and scoreboard write, but the restore
|
||||
code can't handle that case yet. */
|
||||
md_onsignal_default();
|
||||
|
||||
time(&date);
|
||||
lt = localtime(&date);
|
||||
clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue