Ticket #43206

Nonsafe unit_list_iterate() used when unit may escape

Date d'ouverture: 2021-11-13 21:14 Dernière mise à jour: 2021-11-28 00:19

Rapporteur:
Propriétaire:
Type:
État:
Atteints
Composant:
Priorité:
5 - moyen
Sévérité:
5 - moyen
Résolution:
Fixed
Fichier:
1

Détails

When handling unit escape, potential units are iterated with iterate_unit_list(ptile->units). If the unit does escape, it will leave the ptile->units list. Bad things can happen when iterating over a list that changes during the iteration. In this case it most likely causes later units in the original tile not to be considered for escaping at all, though a server crash is not impossible.

This should use iterate_unit_list_safe()

Ticket History (3/4 Histories)

2021-11-13 21:14 Updated by: cazfi
  • New Ticket "Nonsafe unit_list_iterate() used when unit may escape" created
2021-11-13 21:20 Updated by: cazfi
  • Résolution Update from Aucun to Accepted
  • Jalon Update from (Aucun) to 3.0.0 (atteints)
2021-11-28 00:19 Updated by: cazfi
  • État Update from Ouvert to Atteints
  • Propriétaire Update from (Aucun) to cazfi
  • Résolution Update from Accepted to Fixed

Modifier

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Connexion