summaryrefslogtreecommitdiff
path: root/jouer.c
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2015-01-07 13:44:10 +0100
committerOlivier Gayot <duskcoder@gmail.com>2015-01-07 13:44:10 +0100
commit2b0e7310eec1c32e51c35952cfa387231c098303 (patch)
treea2d33a064929ce73e6ff15587dbb3c1cfc556abd /jouer.c
parent9bbff3216b9f99d86f3757dbad70c9d91ef8d700 (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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/jouer.c b/jouer.c
index c649874..4268caf 100644
--- a/jouer.c
+++ b/jouer.c
@@ -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