Ticket #47961

dai_select_tech() using A_LAST instead of A_ARRAY_SIZE for array length

Open Date: 2023-04-28 06:11 Last Update: 2023-09-03 15:40

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

Details

dai_select_tech():

  int values[MAX(A_LAST, A_UNSET + 1)];
  int goal_values[MAX(A_LAST, A_UNSET + 1)];

A_ARRAY_SIZE should be used instead of A_LAST in places like this. There's no hard bug at the moment, as 'A_UNSET + 1' is the bigger value anyway.

Ticket History (3/5 Histories)

2023-04-28 06:11 Updated by: cazfi
  • New Ticket "dai_select_tech() using A_LAST instead of A_ARRAY_SIZE for array length" created
2023-06-12 09:04 Updated by: cazfi
2023-08-30 12:29 Updated by: cazfi
  • Owner Update from (None) to cazfi
  • Resolution Update from None to Accepted
2023-09-03 15:40 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