src/audio/SDL_audio.c
changeset 1379 c0a74f199ecf
parent 1361 19418e4422cb
child 1402 d910939febfa
--- a/src/audio/SDL_audio.c	Sun Feb 19 23:38:57 2006 +0000
+++ b/src/audio/SDL_audio.c	Sun Feb 19 23:46:34 2006 +0000
@@ -373,8 +373,7 @@
 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);