mirror of
https://github.com/TheAlgorithms/C
synced 2024-11-22 05:21:49 +03:00
chore: fix tic_tac_toe.c
CodeQL warning (#1133)
e<=8 is not needed as remainder is always less than remainder so e<9(e>=8) is obvious in every case
This commit is contained in:
parent
55b2045b19
commit
741d3f95b3
@ -283,7 +283,7 @@ void place()
|
|||||||
|
|
||||||
int e = rand() % 9;
|
int e = rand() % 9;
|
||||||
|
|
||||||
if (e >= 0 && e <= 8)
|
if (e >= 0)
|
||||||
{
|
{
|
||||||
if (game_table[e] != 'x' && game_table[e] != 'o')
|
if (game_table[e] != 'x' && game_table[e] != 'o')
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user