diff --git a/src/libs/decoders/SDL_sound.c b/src/libs/decoders/SDL_sound.c index 1d317a22..e71a66c9 100644 --- a/src/libs/decoders/SDL_sound.c +++ b/src/libs/decoders/SDL_sound.c @@ -32,11 +32,6 @@ # include #endif -#ifdef _MSC_VER -// Avoid warning about use of strncpy -#define _CRT_SECURE_NO_WARNINGS -#endif - #include #include #include "SDL_sound.h" @@ -283,8 +278,7 @@ void __Sound_SetError(const char *str) } /* if */ err->error_available = 1; - strncpy(err->error_string, str, sizeof (err->error_string)); - err->error_string[sizeof (err->error_string) - 1] = '\0'; + snprintf(err->error_string, sizeof (err->error_string), "%s", str); } /* __Sound_SetError */