if ( ( obj->item_type == ITEM_CORPSE_PC || obj->wear_loc == WEAR_FLOAT )
&& obj->contains )
{ /* save the contents */
OBJ_DATA *t_obj = NULL;
OBJ_DATA *next_obj = NULL;
for ( t_obj = obj->contains; t_obj != NULL; t_obj = next_obj )
{
next_obj = t_obj->next_content;
obj_from_obj( t_obj );
if ( obj->in_obj ) /* in another object */
obj_to_obj( t_obj, obj->in_obj );
else if ( obj->carried_by ) /* carried */
if ( obj->wear_loc == WEAR_FLOAT )
if ( obj->carried_by->in_room == NULL )
extract_obj( t_obj );
else
obj_to_room( t_obj, obj->carried_by->in_room );
else
obj_to_char( t_obj, obj->carried_by );
else if ( obj->in_room == NULL ) /* destroy it */
extract_obj( t_obj );
else /* to a room */
obj_to_room( t_obj, obj->in_room );
}
}
extract_obj( obj );
}
This bug usually occurs on body parts with timers, it's not terribly frequent but I don't like any bugs…
The error:
Other times it's obj 10 (a corpse) or an arm etc etc.
I'm wondering if something as simple as…
;
Then switching the for loop from:
To:
With:
Anyway, it's a bug that pops up in Stock RoM/RaM so it'd be great to fix for all.
Thoughts?