From c10788083cc013fb8f93cc5a223aab205e6da15c Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Wed, 7 Jan 2015 13:20:07 +0100 Subject: Fix segmentation fault when the game starts Since no prototype for Fchangercurseurpersos was given, a nasty exception was raised when we passed an invalid data to this function. By providing its prototype, the compiler gives us a clue about the usage of an invalid pointer type that we can fix. Signed-off-by: Olivier Gayot --- prototypes.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'prototypes.h') diff --git a/prototypes.h b/prototypes.h index 2634be1..00b621f 100644 --- a/prototypes.h +++ b/prototypes.h @@ -26,6 +26,8 @@ void Fremplirennemis (SURFACES *surfaces,int Vnbennemis,ENNEMIS ennemis[]); int Fcalculerdegats(PERSONNAGES persos[],int *Vtourallie,int *min,ENNEMIS ennemis[],int selection,int camp,int type); int Fcalculersoins(PERSONNAGES persos[],int *Vtourallie,int *min,ENNEMIS ennemis[],int selection); void Fchangercurseur (SURFACES *surfaces, POSITIONS *positions,int selection,ENNEMIS ennemis[]); +void Fchangercurseurennemis (SURFACES *surfaces, POSITIONS *positions,int selection,ENNEMIS ennemis[]); +void Fchangercurseurpersos (SURFACES *surfaces, POSITIONS *positions,int selection,PERSONNAGES persos[]); void Fafficherdegats (SURFACES *surfaces, POSITIONS *positions, int degats,int camp, int cible,PERSONNAGES persos[]); void Fremplircompetencesennemis (ENNEMIS ennemis[],int Vnbennemis); void Fselectionnermagienoire (SURFACES *surfaces,POSITIONS *positions,PERSONNAGES persos[],int *Vtourallie,ENNEMIS ennemis[],int Vnbennemis,int*Vtour); -- cgit v1.2.3