src/audio/windx5/SDL_dx5audio.c
changeset 1330 450721ad5436
parent 1312 c9b51268668f
child 1336 3692456e7b0f
     1.1 --- a/src/audio/windx5/SDL_dx5audio.c	Sat Feb 04 22:01:44 2006 +0000
     1.2 +++ b/src/audio/windx5/SDL_dx5audio.c	Mon Feb 06 08:28:51 2006 +0000
     1.3 @@ -22,12 +22,12 @@
     1.4  
     1.5  /* Allow access to a raw mixing buffer */
     1.6  
     1.7 -#include <stdio.h>
     1.8 -
     1.9  #include "SDL_types.h"
    1.10  #include "SDL_error.h"
    1.11  #include "SDL_timer.h"
    1.12  #include "SDL_audio.h"
    1.13 +#include "SDL_stdlib.h"
    1.14 +#include "SDL_string.h"
    1.15  #include "SDL_audio_c.h"
    1.16  #include "SDL_dx5audio.h"
    1.17  
    1.18 @@ -223,12 +223,13 @@
    1.19  			error = "Function not supported";
    1.20  			break;
    1.21  		default:
    1.22 -			sprintf(errbuf, "%s: Unknown DirectSound error: 0x%x",
    1.23 +			snprintf(errbuf, SDL_arraysize(errbuf),
    1.24 +			         "%s: Unknown DirectSound error: 0x%x",
    1.25  								function, code);
    1.26  			break;
    1.27  	}
    1.28  	if ( ! errbuf[0] ) {
    1.29 -		sprintf(errbuf, "%s: %s", function, error);
    1.30 +		snprintf(errbuf, SDL_arraysize(errbuf), "%s: %s", function, error);
    1.31  	}
    1.32  	SDL_SetError("%s", errbuf);
    1.33  	return;