From d2072e3d01df9a47fe5a445b92ddf787e0585d15 Mon Sep 17 00:00:00 2001 From: Rumble Date: Sat, 8 Sep 2012 18:27:35 +0000 Subject: [PATCH] Uncommented code in objsave.c that prevents crash on loading deleted objects. --Rumble --- src/objsave.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/objsave.c b/src/objsave.c index b835303..bba2658 100644 --- a/src/objsave.c +++ b/src/objsave.c @@ -1026,15 +1026,11 @@ obj_save_data *objsave_parse_objects(FILE *fl) if (*line == '#') { /* check for false alarm. */ if (sscanf(line, "#%d", &nr) == 1) { - /* I'm currently unaware as to why the following IF skips on the - * loop when an object is returned NOTHING due to the fact that "NOTHING" - * is handled in below in such an instance. Unless someone knows why - * this was written as such, it's now obsolete. - * -Vatiken + /* Do not save an object if it has been deleted */ if (real_object(nr) == NOTHING) { log("SYSERR: Protection: deleting object %d.", nr); continue; - } */ + } if (temp) { current->obj = temp; CREATE(current->next, obj_save_data, 1);