msi: Leave room for the NULL terminator.
This commit is contained in:
parent
d165435048
commit
40841946f5
|
@ -1549,10 +1549,10 @@ UINT WINAPI MsiGetFileVersionA(LPCSTR szFilePath, LPSTR lpVersionBuf,
|
||||||
|
|
||||||
if( (ret == ERROR_SUCCESS || ret == ERROR_MORE_DATA) && lpwVersionBuff )
|
if( (ret == ERROR_SUCCESS || ret == ERROR_MORE_DATA) && lpwVersionBuff )
|
||||||
WideCharToMultiByte(CP_ACP, 0, lpwVersionBuff, -1,
|
WideCharToMultiByte(CP_ACP, 0, lpwVersionBuff, -1,
|
||||||
lpVersionBuf, *pcchVersionBuf, NULL, NULL);
|
lpVersionBuf, *pcchVersionBuf + 1, NULL, NULL);
|
||||||
if( (ret == ERROR_SUCCESS || ret == ERROR_MORE_DATA) && lpwLangBuff )
|
if( (ret == ERROR_SUCCESS || ret == ERROR_MORE_DATA) && lpwLangBuff )
|
||||||
WideCharToMultiByte(CP_ACP, 0, lpwLangBuff, -1,
|
WideCharToMultiByte(CP_ACP, 0, lpwLangBuff, -1,
|
||||||
lpLangBuf, *pcchLangBuf, NULL, NULL);
|
lpLangBuf, *pcchLangBuf + 1, NULL, NULL);
|
||||||
|
|
||||||
end:
|
end:
|
||||||
msi_free(szwFilePath);
|
msi_free(szwFilePath);
|
||||||
|
|
|
@ -1988,11 +1988,8 @@ static void test_MsiGetFileVersion(void)
|
||||||
ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz);
|
ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz);
|
||||||
ok(!lstrcmpA(lang, langcheck), "Expected %s, got %s\n", langcheck, lang);
|
ok(!lstrcmpA(lang, langcheck), "Expected %s, got %s\n", langcheck, lang);
|
||||||
ok(langsz == langchecksz, "Expected %d, got %d\n", langchecksz, langsz);
|
ok(langsz == langchecksz, "Expected %d, got %d\n", langchecksz, langsz);
|
||||||
todo_wine
|
ok(!lstrcmpA(version, vercheck),
|
||||||
{
|
"Expected %s, got %s\n", vercheck, version);
|
||||||
ok(!lstrcmpA(version, vercheck),
|
|
||||||
"Expected %s, got %s\n", vercheck, version);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* only check version */
|
/* only check version */
|
||||||
versz = MAX_PATH;
|
versz = MAX_PATH;
|
||||||
|
@ -2000,11 +1997,8 @@ static void test_MsiGetFileVersion(void)
|
||||||
r = MsiGetFileVersionA(path, version, &versz, NULL, NULL);
|
r = MsiGetFileVersionA(path, version, &versz, NULL, NULL);
|
||||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz);
|
ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz);
|
||||||
todo_wine
|
ok(!lstrcmpA(version, vercheck),
|
||||||
{
|
"Expected %s, got %s\n", vercheck, version);
|
||||||
ok(!lstrcmpA(version, vercheck),
|
|
||||||
"Expected %s, got %s\n", vercheck, version);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* only check language */
|
/* only check language */
|
||||||
langsz = MAX_PATH;
|
langsz = MAX_PATH;
|
||||||
|
|
Loading…
Reference in New Issue