Make sure that the size of the buffer passed to RegSetValueExW is in
bytes not WCHARs.
This commit is contained in:
parent
c9860a504c
commit
3d9fb73909
|
@ -1115,7 +1115,8 @@ HRESULT WINAPI SHGetFolderPathW(
|
||||||
strcpyW(pszPath + 3, szDefaultPath);
|
strcpyW(pszPath + 3, szDefaultPath);
|
||||||
}
|
}
|
||||||
dwType=REG_SZ;
|
dwType=REG_SZ;
|
||||||
RegSetValueExW(hKey,szValueName,0,REG_SZ,(LPBYTE)pszPath,strlenW(pszPath)+1);
|
RegSetValueExW(hKey,szValueName,0,REG_SZ,(LPBYTE)pszPath,
|
||||||
|
(strlenW(pszPath)+1)*sizeof(WCHAR));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
|
@ -1151,7 +1152,8 @@ HRESULT WINAPI SHGetFolderPathW(
|
||||||
strcpyW(pszPath + 3, szDefaultPath);
|
strcpyW(pszPath + 3, szDefaultPath);
|
||||||
}
|
}
|
||||||
dwType=REG_SZ;
|
dwType=REG_SZ;
|
||||||
RegSetValueExW(hKey,szValueName,0,REG_SZ,(LPBYTE)pszPath,strlenW(pszPath)+1);
|
RegSetValueExW(hKey,szValueName,0,REG_SZ,(LPBYTE)pszPath,
|
||||||
|
(strlenW(pszPath)+1)*sizeof(WCHAR));
|
||||||
}
|
}
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue