Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
40841946
Commit
40841946
authored
Feb 04, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Feb 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Leave room for the NULL terminator.
parent
d1654350
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
12 deletions
+6
-12
msi.c
dlls/msi/msi.c
+2
-2
msi.c
dlls/msi/tests/msi.c
+4
-10
No files found.
dlls/msi/msi.c
View file @
40841946
...
...
@@ -1549,10 +1549,10 @@ UINT WINAPI MsiGetFileVersionA(LPCSTR szFilePath, LPSTR lpVersionBuf,
if
(
(
ret
==
ERROR_SUCCESS
||
ret
==
ERROR_MORE_DATA
)
&&
lpwVersionBuff
)
WideCharToMultiByte
(
CP_ACP
,
0
,
lpwVersionBuff
,
-
1
,
lpVersionBuf
,
*
pcchVersionBuf
,
NULL
,
NULL
);
lpVersionBuf
,
*
pcchVersionBuf
+
1
,
NULL
,
NULL
);
if
(
(
ret
==
ERROR_SUCCESS
||
ret
==
ERROR_MORE_DATA
)
&&
lpwLangBuff
)
WideCharToMultiByte
(
CP_ACP
,
0
,
lpwLangBuff
,
-
1
,
lpLangBuf
,
*
pcchLangBuf
,
NULL
,
NULL
);
lpLangBuf
,
*
pcchLangBuf
+
1
,
NULL
,
NULL
);
end:
msi_free
(
szwFilePath
);
...
...
dlls/msi/tests/msi.c
View file @
40841946
...
...
@@ -1988,11 +1988,8 @@ static void test_MsiGetFileVersion(void)
ok
(
versz
==
verchecksz
,
"Expected %d, got %d
\n
"
,
verchecksz
,
versz
);
ok
(
!
lstrcmpA
(
lang
,
langcheck
),
"Expected %s, got %s
\n
"
,
langcheck
,
lang
);
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 */
versz
=
MAX_PATH
;
...
...
@@ -2000,11 +1997,8 @@ static void test_MsiGetFileVersion(void)
r
=
MsiGetFileVersionA
(
path
,
version
,
&
versz
,
NULL
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
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 */
langsz
=
MAX_PATH
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment