1
0
mirror of https://github.com/RPCS3/soundtouch.git synced 2024-11-09 20:33:03 +01:00

Replaced proprietary strcpy_s with ansi-compatible strncpy

This commit is contained in:
oparviai 2010-12-12 19:12:12 +00:00
parent 4c223f5a79
commit 8116c7bd42

View File

@ -35,6 +35,7 @@
////////////////////////////////////////////////////////////////////////////////
#include <windows.h>
#include <string.h>
#include "SoundTouchDLL.h"
#include "soundtouch.h"
@ -112,7 +113,8 @@ SOUNDTOUCHDLL_API const char *__stdcall soundtouch_getVersionString()
/// environments that can't properly handle character string as return value
SOUNDTOUCHDLL_API void __stdcall soundtouch_getVersionString2(char* versionString, int bufferSize)
{
strcpy_s(versionString, bufferSize, SoundTouch::getVersionString());
strncpy(versionString, SoundTouch::getVersionString(), bufferSize - 1);
versionString[bufferSize - 1] = 0;
}