sprintf should have been snprintf
authorSam Lantinga <slouken@libsdl.org>
Sun, 19 Feb 2006 18:46:58 +0000
changeset 13753793c4b34a92
parent 1374 998b7f9a287a
child 1376 4a47f20705eb
sprintf should have been snprintf
src/joystick/os2/SDL_sysjoystick.c
src/loadso/macosx/SDL_sysloadso.c
     1.1 --- a/src/joystick/os2/SDL_sysjoystick.c	Sun Feb 19 17:38:32 2006 +0000
     1.2 +++ b/src/joystick/os2/SDL_sysjoystick.c	Sun Feb 19 18:46:58 2006 +0000
     1.3 @@ -292,7 +292,7 @@
     1.4  		/* Hack to define Joystick Port Names */
     1.5  		if ( numdevs > maxdevs ) numdevs = maxdevs;
     1.6  		for (i=0; i<numdevs; i++) {
     1.7 -			SDL_sprintf (SYS_JoyData[i].szDeviceName, SDL_arraysize(szDeviceName), "Default Joystick %c", 'A'+SYS_JoyData[i].id);
     1.8 +			SDL_snprintf (SYS_JoyData[i].szDeviceName, SDL_arraysize(szDeviceName), "Default Joystick %c", 'A'+SYS_JoyData[i].id);
     1.9  		}
    1.10  	}
    1.11  /* Return the number of devices found */
     2.1 --- a/src/loadso/macosx/SDL_sysloadso.c	Sun Feb 19 17:38:32 2006 +0000
     2.2 +++ b/src/loadso/macosx/SDL_sysloadso.c	Sun Feb 19 18:46:58 2006 +0000
     2.3 @@ -1016,7 +1016,7 @@
     2.4  	malloc_sym = SDL_malloc(sym_len + 2);
     2.5  	if (malloc_sym)
     2.6  	{
     2.7 -		SDL_sprintf(malloc_sym, sym_len+2, "_%s", symbol);
     2.8 +		SDL_snprintf(malloc_sym, sym_len+2, "_%s", symbol);
     2.9  		value = dlsymIntern(handle, malloc_sym, 1);
    2.10  		SDL_free(malloc_sym);
    2.11  	}