任务单 #43206

Nonsafe unit_list_iterate() used when unit may escape

开放日期: 2021-11-13 21:14 最后更新: 2021-11-28 00:19

报告人:
属主:
类型:
状态:
关闭
组件:
里程碑:
优先:
5 - Medium
严重性:
5 - Medium
处理结果:
Fixed
文件:
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()

任务单历史 (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
  • 处理结果 Update from to Accepted
  • 里程碑 Update from (无) to 3.0.0 (关闭)
2021-11-28 00:19 Updated by: cazfi
  • 状态 Update from 开启 to 关闭
  • 属主 Update from (无) to cazfi
  • 处理结果 Update from Accepted to Fixed

编辑

Please login to add comment to this ticket » 登录名