Commit db567afe authored by Sam Lantinga's avatar Sam Lantinga

sprintf should have been snprintf

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401379
parent c879c8da
...@@ -292,7 +292,7 @@ if (numdevs > 0) ...@@ -292,7 +292,7 @@ if (numdevs > 0)
/* Hack to define Joystick Port Names */ /* Hack to define Joystick Port Names */
if ( numdevs > maxdevs ) numdevs = maxdevs; if ( numdevs > maxdevs ) numdevs = maxdevs;
for (i=0; i<numdevs; i++) { 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 */ /* Return the number of devices found */
......
...@@ -1016,7 +1016,7 @@ static void *SDL_OSX_dlsym(void * dl_restrict handle, const char * dl_restrict s ...@@ -1016,7 +1016,7 @@ static void *SDL_OSX_dlsym(void * dl_restrict handle, const char * dl_restrict s
malloc_sym = SDL_malloc(sym_len + 2); malloc_sym = SDL_malloc(sym_len + 2);
if (malloc_sym) 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); value = dlsymIntern(handle, malloc_sym, 1);
SDL_free(malloc_sym); SDL_free(malloc_sym);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment