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
5b8fdad9
Commit
5b8fdad9
authored
Nov 21, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Nov 21, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Fix use of integer fields in MsiFormatRecord.
parent
8f207560
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
6 deletions
+25
-6
helpers.c
dlls/msi/helpers.c
+25
-2
format.c
dlls/msi/tests/format.c
+0
-4
No files found.
dlls/msi/helpers.c
View file @
5b8fdad9
...
...
@@ -67,9 +67,32 @@ LPWSTR build_icon_path(MSIPACKAGE *package, LPCWSTR icon_name )
return
FilePath
;
}
LPWSTR
msi_dup_record_field
(
MSIRECORD
*
r
ow
,
INT
index
)
LPWSTR
msi_dup_record_field
(
MSIRECORD
*
r
ec
,
INT
field
)
{
return
strdupW
(
MSI_RecordGetString
(
row
,
index
)
);
DWORD
sz
=
0
;
LPWSTR
str
;
UINT
r
;
if
(
MSI_RecordIsNull
(
rec
,
field
))
return
NULL
;
r
=
MSI_RecordGetStringW
(
rec
,
field
,
NULL
,
&
sz
);
if
(
r
!=
ERROR_SUCCESS
)
return
NULL
;
sz
++
;
str
=
msi_alloc
(
sz
*
sizeof
(
WCHAR
)
);
if
(
!
str
)
return
str
;
str
[
0
]
=
0
;
r
=
MSI_RecordGetStringW
(
rec
,
field
,
str
,
&
sz
);
if
(
r
!=
ERROR_SUCCESS
)
{
ERR
(
"failed to get string!
\n
"
);
msi_free
(
str
);
return
NULL
;
}
return
str
;
}
MSICOMPONENT
*
get_loaded_component
(
MSIPACKAGE
*
package
,
LPCWSTR
Component
)
...
...
dlls/msi/tests/format.c
View file @
5b8fdad9
...
...
@@ -927,10 +927,8 @@ static void test_formatrecord(void)
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
todo_wine
{
ok
(
sz
==
6
,
"size wrong
\n
"
);
ok
(
0
==
strcmp
(
buffer
,
"123456"
),
"wrong output (%s)
\n
"
,
buffer
);
}
r
=
MsiRecordSetString
(
hrec
,
0
,
"[~]"
);
sz
=
sizeof
buffer
;
...
...
@@ -1634,10 +1632,8 @@ static void test_formatrecord(void)
MsiRecordSetString
(
hrec
,
0
,
"[1] [2]"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
todo_wine
{
ok
(
sz
==
8
,
"size wrong(%i)
\n
"
,
sz
);
ok
(
0
==
strcmp
(
buffer
,
"100 -100"
),
"wrong output (%s)
\n
"
,
buffer
);
}
MsiCloseHandle
(
hrec
);
}
...
...
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