diff rogue3/mdport.c @ 7:d388234c4ce9

Don't autosave on segfault or after death
author edwarj4
date Fri, 16 Oct 2009 14:40:16 +0000
parents 9a2c0c60c386
children e7dc901146f1
line wrap: on
line diff
--- a/rogue3/mdport.c	Fri Oct 16 14:30:06 2009 +0000
+++ b/rogue3/mdport.c	Fri Oct 16 14:40:16 2009 +0000
@@ -252,7 +252,9 @@
     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);