任务单 #44130

path_finding.c: Asserts comparing things to TRUE

开放日期: 2022-03-17 10:59 最后更新: 2022-04-18 12:30

报告人:
属主:
类型:
状态:
关闭
组件:
里程碑:
优先:
5 - Medium
严重性:
5 - Medium
处理结果:
Fixed
文件:
3

Details

path_finding.c has some asserts where a value is compared to TRUE with a '=='. One should not do that as TRUE is a macro with specific value (1), and does not match other (non-zero) values though those too indicate true.

任务单历史 (3/11 Histories)

2022-03-17 10:59 Updated by: cazfi
  • New Ticket "path_finding.c: Asserts comparing things to TRUE" created
2022-03-17 11:47 Updated by: cazfi
评论

There's more of them all around the codebase when one greps for "TRUE ==", "FALSE ==", "== TRUE", "== FALSE", "TRUE !=", "FALSE !=", "!= TRUE", "!= FALSE"

Not all of them even in asserts. Limiting scope of this ticket to asserts, though.

2022-03-18 04:39 Updated by: cazfi
2022-04-09 04:24 Updated by: cazfi
  • 属主 Update from (无) to cazfi
  • 处理结果 Update from to Accepted
2022-04-12 15:10 Updated by: cazfi
  • 处理结果 Update from Accepted to
评论

S3_0 version misses savegame2.c (at least) "load_success == TRUE" case.

2022-04-13 02:04 Updated by: cazfi
  • 处理结果 Update from to Accepted
评论

Reply To cazfi

S3_0 version misses savegame2.c (at least) "load_success == TRUE" case.

- Fixed

2022-04-17 13:00 Updated by: cazfi
评论

Reply To cazfi

Not all of them even in asserts. Limiting scope of this ticket to asserts, though.

Rest -> #44401

2022-04-18 12:30 Updated by: cazfi
  • 状态 Update from 开启 to 关闭
  • 处理结果 Update from Accepted to Fixed

编辑

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » 登录名