待辦事項 #47731

Path finding: Make MC and EC unsigned everywhere

啟用日期: 2023-04-01 15:46 最後更新: 2023-04-07 23:44

回報者:
負責人:
類型:
狀態:
關閉
元件:
里程碑:
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
修正
檔案:
2

細節

While I don't expect this to fix path finding overflow alain_bkr saw on https://osdn.net/projects/freeciv/ticket/46286#comment:12505:46286:1679918727 , this should be a step to the right direction, and potentially already fix some other cases.

As path_finding.h comments say, MC and EC should always be positive. However, current code treats them as signed ints almost everywhere. Turn them to unsigned instead.

Ticket History (3/5 Histories)

2023-04-01 15:46 Updated by: cazfi
  • New Ticket "Path finding: Make MC and EC unsigned everywhere" created
2023-04-01 15:59 Updated by: cazfi
  • 負責人 Update from (無) to cazfi
  • 處理結果 Update from to Accepted
評語

Mostly untested patch, but still a commit candidate (I'll test while it's in review).

2023-04-07 23:44 Updated by: cazfi
  • 狀態 Update from 開啟 to 關閉
  • 處理結果 Update from Accepted to 修正

編輯

Please login to add comment to this ticket » 登入