diff --git a/src/unix/sound_sdl.cpp b/src/unix/sound_sdl.cpp index 288f5f7bce..dd251284a1 100644 --- a/src/unix/sound_sdl.cpp +++ b/src/unix/sound_sdl.cpp @@ -215,7 +215,7 @@ bool wxSoundBackendSDL::OpenAudio() #if SDL_MAJOR_VERSION == 1 SDL_AudioDriverName(driver, 256); #elif SDL_MAJOR_VERSION > 1 - strncpy(driver, SDL_GetCurrentAudioDriver(), 256); + wxStrlcpy(driver, SDL_GetCurrentAudioDriver(), 256); #endif wxLogTrace(wxT("sound"), wxT("opened audio, driver '%s'"), wxString(driver, wxConvLocal).c_str());