» SmaugMuds » Bugfix Lists » AFKMud Bugfix List » AFKMud Bug Archive » [Bug] Setting resets on rooms...

Pages:<< prev 1 next >>

Black Hand

GroupAdministrators
Posts3,708
JoinedJan 1, 2002
Bug: Setting resets on rooms that have none yet will crash
Danger: High - Crash condition.
Discovered in: AFKMud 1.77
Found by: pstone
Fixed by: Remcon
---
reset.c, do_reset
in the "random" part find
change it to
in the "trap" "obj" part find
change it to
find
change it to
in the "hide" part find
change it to
find
change it to
I'll just let Remcon's fix speak for itself.
Danger: High - Crash condition.
Discovered in: AFKMud 1.77
Found by: pstone
Fixed by: Remcon
---
reset.c, do_reset
in the "random" part find
if( ch->in_room->first_reset->prev ) ch->in_room->first_reset->prev = pReset;
change it to
if( ch->in_room->first_reset ) ch->in_room->first_reset->prev = pReset;
in the "trap" "obj" part find
if( pReset->first_reset->prev_reset ) pReset->first_reset->prev_reset = tReset;
change it to
if( pReset->first_reset ) pReset->first_reset->prev_reset = tReset;
find
if( ch->in_room->first_reset->prev ) ch->in_room->first_reset->prev = tReset;
change it to
if( ch->in_room->first_reset ) ch->in_room->first_reset->prev = tReset;
in the "hide" part find
if( pReset->first_reset->prev_reset ) pReset->first_reset->prev_reset = tReset;
change it to
if( pReset->first_reset ) pReset->first_reset->prev_reset = tReset;
find
if( ch->in_room->first_reset->prev ) ch->in_room->first_reset->prev = tReset;
change it to
if( ch->in_room->first_reset ) ch->in_room->first_reset->prev = tReset;
Remcon said:
This fixes crashing issues found caused by first_reset being NULL when adding in new resets.
I'll just let Remcon's fix speak for itself.

Pages:<< prev 1 next >>