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