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 --- constantes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'constantes.h') diff --git a/constantes.h b/constantes.h index 1b46e77..24111d3 100644 --- a/constantes.h +++ b/constantes.h @@ -133,7 +133,7 @@ else\ else\ selection=2;\ }\ - Fchangercurseurpersos(surfaces,positions,selection,ennemis);\ + Fchangercurseurpersos(surfaces,positions,selection,persos);\ }\ break;\ case SDLK_DOWN:\ @@ -166,7 +166,7 @@ else\ else\ selection=0;\ }\ - Fchangercurseurpersos(surfaces,positions,selection,ennemis);\ + Fchangercurseurpersos(surfaces,positions,selection,persos);\ }\ break; -- cgit v1.2.3