Commit 916c0647 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Skins2: simpler and more correct code for SHFileOperation since wcsncpy padds NULL

parent 7e604f9a
......@@ -482,9 +482,8 @@ void Win32Factory::rmDir( const string &rPath )
LPWSTR dir_temp = ToWide( rPath.c_str() );
size_t len = wcslen( dir_temp );
LPWSTR dir = (wchar_t *)malloc( (len + 1) * sizeof (wchar_t) );
wcsncpy( dir, dir_temp, len );
dir[len] = '\0';
LPWSTR dir = (wchar_t *)malloc( (len + 2) * sizeof (wchar_t) );
wcsncpy( dir, dir_temp, len + 2);
SHFILEOPSTRUCTW file_op = {
NULL,
......
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