Ticket #45480

unit_list_iterate_safe() evaluates 'unitlist' twice

Open Date: 2022-08-27 19:08 Last Update: 2022-09-13 14:13

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
1

Details

unit_list_iterate_safe() evaluates 'unitlist' parameter twice (sometimes); once to get its size, and if the size is above zero, second time to iterate it.

Ticket History (3/4 Histories)

2022-08-27 19:08 Updated by: cazfi
  • New Ticket "unit_list_iterate_safe() evaluates 'unitlist' twice" created
2022-09-03 13:38 Updated by: cazfi
  • Owner Update from (None) to cazfi
  • Resolution Update from None to Accepted
  • Milestone Update from (None) to 3.0.4 (closed)
Comment

Equivalent behavior with other _iterate_safe() macros. All fixed in the attached patch. Unlikely to make much difference with current users (but I've not evaluated all of those)

2022-09-13 14:13 Updated by: cazfi
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed

Edit

Please login to add comment to this ticket » Login