Commit 2fa9a4ae authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

WinVLC: use _snwprintf that is conforming to the standard

parent 4a1beda8
...@@ -132,7 +132,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, ...@@ -132,7 +132,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
if( S_OK != SHGetFolderPathW( NULL, CSIDL_APPDATA | CSIDL_FLAG_CREATE, if( S_OK != SHGetFolderPathW( NULL, CSIDL_APPDATA | CSIDL_FLAG_CREATE,
NULL, SHGFP_TYPE_CURRENT, path ) ) NULL, SHGFP_TYPE_CURRENT, path ) )
fprintf( stderr, "Can't open the vlc conf PATH\n" ); fprintf( stderr, "Can't open the vlc conf PATH\n" );
swprintf( path+wcslen( path ), L"%s", L"\\vlc\\crashdump" ); _snwprintf( path+wcslen( path ), MAX_PATH, L"%s", L"\\vlc\\crashdump" );
crashdump_path = &path[0]; crashdump_path = &path[0];
check_crashdump(); check_crashdump();
...@@ -188,7 +188,7 @@ static void check_crashdump(void) ...@@ -188,7 +188,7 @@ static void check_crashdump(void)
SYSTEMTIME now; SYSTEMTIME now;
GetSystemTime(&now); GetSystemTime(&now);
wchar_t remote_file[MAX_PATH]; wchar_t remote_file[MAX_PATH];
swprintf(remote_file, _snwprintf(remote_file, MAX_PATH,
L"/crashes-win32/%04d%02d%02d%02d%02d%02d", L"/crashes-win32/%04d%02d%02d%02d%02d%02d",
now.wYear, now.wMonth, now.wDay, now.wHour, now.wYear, now.wMonth, now.wDay, now.wHour,
now.wMinute, now.wSecond ); now.wMinute, now.wSecond );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment