Fixed Crash occuring from invalid objects in player object files
This commit is contained in:
@@ -36,6 +36,8 @@ Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
|
|||||||
(lots of major bugfixes too)
|
(lots of major bugfixes too)
|
||||||
@
|
@
|
||||||
tbaMUD 3.61
|
tbaMUD 3.61
|
||||||
|
[Mar 17 2010] - Fizban
|
||||||
|
Made non-existant objects in pfiles be skipped instead of crashing the MUD (thanks drefs)
|
||||||
[Feb 13 2010] - Rumble
|
[Feb 13 2010] - Rumble
|
||||||
Removed delete object option in oedit menu.
|
Removed delete object option in oedit menu.
|
||||||
[Feb 08 2010] - Rumble
|
[Feb 08 2010] - Rumble
|
||||||
|
|||||||
@@ -1025,6 +1025,10 @@ 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) {
|
||||||
|
if (real_object(nr) == NOTHING) { //object does not exist
|
||||||
|
log("SYSERR: Protection: deleting object %d.", nr);
|
||||||
|
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