Full fix w/formatting corrections in SVN (just bug fix below).
Code:
Index: src/objsave.c
===================================================================
--- src/objsave.c (revision 324)
+++ src/objsave.c (working copy)
@@ -1025,21 +1026,26 @@
if (*line == '#') {
/* check for false alarm. */
if (sscanf(line, "#%d", &nr) == 1) {
- if (real_object(nr) == NOTHING) { //object does not exist
- log("SYSERR: Protection: deleting object %d.", nr);
+ /* 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
+ if (real_object(nr) == NOTHING) {
+ log("SYSERR: Protection: deleting object %d.", nr);
continue;
- }
+ } */
@@ -1058,14 +1064,21 @@
continue;
}
+ /* Should never get here, but since we did in the past, I'll put
+ * a safety check in. */
+ if (temp == NULL) {
+ log("SYSERR: Attempting to parse obj_save_data on NULL object.");
+ abort();
+ }
+
This entire function offends me.