Use only safe string functions

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401383
This commit is contained in:
Sam Lantinga 2006-02-19 23:46:34 +00:00
parent a81db3ea34
commit 1da8cb0143
60 changed files with 223 additions and 263 deletions

View file

@ -373,8 +373,7 @@ int SDL_AudioInit(const char *driver_name)
char *SDL_AudioDriverName(char *namebuf, int maxlen)
{
if ( current_audio != NULL ) {
SDL_strncpy(namebuf, current_audio->name, maxlen-1);
namebuf[maxlen-1] = '\0';
SDL_strlcpy(namebuf, current_audio->name, maxlen);
return(namebuf);
}
return(NULL);