mirror of
https://github.com/tbamud/tbamud.git
synced 2026-02-24 20:41:44 +01:00
Uncommented code in objsave.c that prevents crash on loading deleted objects. --Rumble
This commit is contained in:
@@ -1026,15 +1026,11 @@ obj_save_data *objsave_parse_objects(FILE *fl)
|
|||||||
if (*line == '#') {
|
if (*line == '#') {
|
||||||
/* check for false alarm. */
|
/* check for false alarm. */
|
||||||
if (sscanf(line, "#%d", &nr) == 1) {
|
if (sscanf(line, "#%d", &nr) == 1) {
|
||||||
/* I'm currently unaware as to why the following IF skips on the
|
/* Do not save an object if it has been deleted */
|
||||||
* 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) {
|
if (real_object(nr) == NOTHING) {
|
||||||
log("SYSERR: Protection: deleting object %d.", nr);
|
log("SYSERR: Protection: deleting object %d.", nr);
|
||||||
continue;
|
continue;
|
||||||
} */
|
}
|
||||||
if (temp) {
|
if (temp) {
|
||||||
current->obj = temp;
|
current->obj = temp;
|
||||||
CREATE(current->next, obj_save_data, 1);
|
CREATE(current->next, obj_save_data, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user