Bug: wipe_resets would only work properly once on an area, then it would crash.
Discovered in: AFKMud 1.63
Danger: High - Crash bug.
Found by: Cynshard
Fixed by: Samson
resets.c, wipe_resets, replace with:
void wipe_resets( AREA_DATA *pArea, ROOM_INDEX_DATA *pRoom, sh_int map, sh_int x, sh_int y )
for( pReset = pArea->first_reset; pReset; )
if( pReset->command != 'R' && is_room_reset( pReset, pRoom, pArea ) )
/* Resets always go forward, so we can safely use the previous reset,
providing it exists, or first_reset if it doesnt. -- Altrag */
RESET_DATA *prev = pReset->prev;
if( pRoom == NULL || ( pReset->arg4 == map && pReset->arg5 == x && pReset->arg6 == y ) )
delete_reset( pArea, pReset );
pReset = ( prev ? prev->next : pArea->first_reset );
pReset = pReset->next;
Me and Valgrind spent some quality time with this and I think we figured out the problem was the wipe_resets function itself was dirty. Very dirty. So I popped open my copy of Smaug FUSS and put back the old version, with the mods for overland support. Valgrind no longer complains about it and the resets are redone the way they should be.
Thanks to Cynshard for providing enough information to help track this one down. Hopefully this ends any trouble the resets were causing.