diff options
author | Olivier Gayot <duskcoder@gmail.com> | 2015-01-07 13:44:10 +0100 |
---|---|---|
committer | Olivier Gayot <duskcoder@gmail.com> | 2015-01-07 13:44:10 +0100 |
commit | 2b0e7310eec1c32e51c35952cfa387231c098303 (patch) | |
tree | a2d33a064929ce73e6ff15587dbb3c1cfc556abd /jouer.c | |
parent | 9bbff3216b9f99d86f3757dbad70c9d91ef8d700 (diff) |
fixed invalid usage of = instead of ==
thanks to compiler, we wre able to detect an usage of operator= instead
of operator== which leads to undefined behaviour in the program.
fixed ty replacing it by operator==
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'jouer.c')
-rw-r--r-- | jouer.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -101,12 +101,12 @@ int Fjouer (SURFACES *surfaces, POSITIONS *positions, PERSONNAGES persos[],ENNEM } else if(Vtour==ENNEMI) // sinon si c'est le cpu qui joue { - while(ennemis[Vtourennemi].etat==MORT) - { - if(Vtourennemi<Vnbennemis) + while (ennemis[Vtourennemi].etat == MORT) { + if (Vtourennemi < Vnbennemis) { Vtourennemi++; - else if(Vtourennemi=Vnbennemis) - Vtourennemi=0; + } else if (Vtourennemi == Vnbennemis) { + Vtourennemi = 0; + } } Factionennemi(&Vtourennemi,surfaces,positions,ennemis,persos,Vnbennemis,&Vtour,Vtourallie); } // les actions sont faites |