[SDL] Compile Error SDL_mixer

Patrice Mandin mandin.patrice at wanadoo.fr
Fri Dec 22 11:23:59 PST 2006


Le Fri, 22 Dec 2006 20:02:19 +0100 (CET)
"Torsten Giebl" <wizard at syntheticsw.com> a écrit:

> @PMandin :
> 
> With this latest Patch :
> 
> --- trunk/SDL_mixer/mixer.c	2006/12/19 19:42:07	2928
> +++ trunk/SDL_mixer/mixer.c	2006/12/19 19:55:28	2929
> @@ -512,7 +512,7 @@
>  	}
> 
>  	/* Allocate the chunk memory */
> -	chunk = (Mix_Chunk *)malloc(sizeof(Mix_Chunk));
> +	chunk = (Mix_Chunk *)calloc(sizeof(Mix_Chunk));
>  	if ( chunk == NULL ) {
>  		SDL_SetError("Out of memory");
>  		return(NULL);
> 
> i got a compile error, just because calloc needs two
> statements. Nr of Elements and Size of one Element.

Oops, I should read manpage before commiting. Fixed in svn.

-- 
Patrice Mandin
WWW: http://pmandin.atari.org/
Programmeur Linux, Atari
Spécialité: Développement, jeux





More information about the SDL mailing list