Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
462ec1ba
Commit
462ec1ba
authored
Nov 07, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Return correct length for the empty string from deformat_string.
parent
f6542bbb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
+14
-15
format.c
dlls/msi/format.c
+14
-15
No files found.
dlls/msi/format.c
View file @
462ec1ba
...
...
@@ -1023,24 +1023,23 @@ done:
}
/* wrapper to resist a need for a full rewrite right now */
DWORD
deformat_string
(
MSIPACKAGE
*
package
,
const
WCHAR
*
ptr
,
WCHAR
**
data
)
DWORD
deformat_string
(
MSIPACKAGE
*
package
,
const
WCHAR
*
fmt
,
WCHAR
**
data
)
{
if
(
ptr
)
{
DWORD
len
=
0
;
MSIRECORD
*
rec
=
MSI_CreateRecord
(
1
);
MSI_RecordSetStringW
(
rec
,
0
,
ptr
);
MSI_FormatRecordW
(
package
,
rec
,
NULL
,
&
len
);
DWORD
len
;
MSIRECORD
*
rec
;
len
++
;
*
data
=
msi_alloc
(
len
*
sizeof
(
WCHAR
)
);
if
(
len
>
1
)
MSI_FormatRecordW
(
package
,
rec
,
*
data
,
&
len
);
else
*
data
[
0
]
=
0
;
*
data
=
NULL
;
if
(
!
fmt
)
return
0
;
if
(
!
(
rec
=
MSI_CreateRecord
(
1
)))
return
0
;
MSI_RecordSetStringW
(
rec
,
0
,
fmt
);
MSI_FormatRecordW
(
package
,
rec
,
NULL
,
&
len
);
if
(
!
(
*
data
=
msi_alloc
(
++
len
*
sizeof
(
WCHAR
)
)))
{
msiobj_release
(
&
rec
->
hdr
);
return
len
;
}
*
data
=
NULL
;
return
0
;
}
MSI_FormatRecordW
(
package
,
rec
,
*
data
,
&
len
);
msiobj_release
(
&
rec
->
hdr
);
return
len
;
}
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