src/audio/SDL_audio.c
changeset 1379 c0a74f199ecf
parent 1361 19418e4422cb
child 1402 d910939febfa
equal deleted inserted replaced
1378:dc0e13e7e1ae 1379:c0a74f199ecf
   371 }
   371 }
   372 
   372 
   373 char *SDL_AudioDriverName(char *namebuf, int maxlen)
   373 char *SDL_AudioDriverName(char *namebuf, int maxlen)
   374 {
   374 {
   375 	if ( current_audio != NULL ) {
   375 	if ( current_audio != NULL ) {
   376 		SDL_strncpy(namebuf, current_audio->name, maxlen-1);
   376 		SDL_strlcpy(namebuf, current_audio->name, maxlen);
   377 		namebuf[maxlen-1] = '\0';
       
   378 		return(namebuf);
   377 		return(namebuf);
   379 	}
   378 	}
   380 	return(NULL);
   379 	return(NULL);
   381 }
   380 }
   382 
   381