Tíquete #43206

Nonsafe unit_list_iterate() used when unit may escape

: 2021-11-13 21:14 Última Atualização: 2021-11-28 00:19

Relator:
Dono:
Tipo:
Estado:
Fechado
Componente:
Marcos:
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Fixed
Arquivo:
1

Details

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
  • Resolução Update from Nenhum to Accepted
  • Marco Update from (Nenhum) to 3.0.0 (fechado)
2021-11-28 00:19 Updated by: cazfi
  • Estado Update from Aberto to Fechado
  • Dono Update from (Nenhum) to cazfi
  • Resolução Update from Accepted to Fixed

Editar

Please login to add comment to this ticket » Login