Reassign linked list pointers after memset (title screen crash).

This commit is contained in:
Steve 2016-05-24 09:10:36 +01:00
parent 4092ae6a10
commit b2e22b31b9
1 changed files with 7 additions and 0 deletions

View File

@ -500,4 +500,11 @@ void destroyBattle(void)
destroyEffects(); destroyEffects();
memset(&battle, 0, sizeof(Battle)); memset(&battle, 0, sizeof(Battle));
battle.bulletTail = &battle.bulletHead;
battle.debrisTail = &battle.debrisHead;
battle.entityTail = &battle.entityHead;
battle.effectTail = &battle.effectHead;
battle.objectiveTail = &battle.objectiveHead;
battle.locationTail = &battle.locationHead;
battle.spawnerTail = &battle.spawnerHead;
} }