Tíquete #44130

path_finding.c: Asserts comparing things to TRUE

: 2022-03-17 10:59 Última Atualização: 2022-04-18 12:30

Relator:
Dono:
Tipo:
Estado:
Fechado
Componente:
Marcos:
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Fixed
Arquivo:
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.

Ticket History (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
Comentário

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
  • Dono Update from (Nenhum) to cazfi
  • Resolução Update from Nenhum to Accepted
2022-04-12 15:10 Updated by: cazfi
  • Resolução Update from Accepted to Nenhum
Comentário

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

2022-04-13 02:04 Updated by: cazfi
  • Resolução Update from Nenhum to Accepted
Comentário

Reply To cazfi

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

- Fixed

2022-04-17 13:00 Updated by: cazfi
Comentário

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
  • Estado Update from Aberto to Fechado
  • Resolução Update from Accepted to Fixed

Editar

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