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
22743883
Commit
22743883
authored
Oct 17, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Oct 18, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Save nonpersistent strings as holes in the string pool.
parent
36df6a06
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
string.c
dlls/msi/string.c
+12
-5
db.c
dlls/msi/tests/db.c
+1
-4
No files found.
dlls/msi/string.c
View file @
22743883
...
...
@@ -457,20 +457,22 @@ UINT msi_strcmp( const string_table *st, UINT lval, UINT rval, UINT *res )
static
void
string_totalsize
(
const
string_table
*
st
,
UINT
*
datasize
,
UINT
*
poolsize
)
{
UINT
i
,
len
,
max
,
holesize
;
UINT
i
,
len
,
holesize
;
if
(
st
->
strings
[
0
].
str
||
st
->
strings
[
0
].
persistent_refcount
||
st
->
strings
[
0
].
nonpersistent_refcount
)
ERR
(
"oops. element 0 has a string
\n
"
);
*
poolsize
=
4
;
*
datasize
=
0
;
max
=
1
;
holesize
=
0
;
for
(
i
=
1
;
i
<
st
->
maxcount
;
i
++
)
{
if
(
!
st
->
strings
[
i
].
persistent_refcount
)
continue
;
if
(
st
->
strings
[
i
].
str
)
{
TRACE
(
"[%u] nonpersistent = %s
\n
"
,
i
,
debugstr_w
(
st
->
strings
[
i
].
str
));
(
*
poolsize
)
+=
4
;
}
else
if
(
st
->
strings
[
i
].
str
)
{
TRACE
(
"[%u] = %s
\n
"
,
i
,
debugstr_w
(
st
->
strings
[
i
].
str
));
len
=
WideCharToMultiByte
(
st
->
codepage
,
0
,
...
...
@@ -480,7 +482,6 @@ static void string_totalsize( const string_table *st, UINT *datasize, UINT *pool
(
*
datasize
)
+=
len
;
if
(
len
>
0xffff
)
(
*
poolsize
)
+=
4
;
max
=
i
+
1
;
(
*
poolsize
)
+=
holesize
+
4
;
holesize
=
0
;
}
...
...
@@ -634,7 +635,13 @@ UINT msi_save_string_table( const string_table *st, IStorage *storage )
for
(
i
=
1
;
i
<
st
->
maxcount
;
i
++
)
{
if
(
!
st
->
strings
[
i
].
persistent_refcount
)
{
pool
[
n
*
2
]
=
0
;
pool
[
n
*
2
+
1
]
=
0
;
n
++
;
continue
;
}
sz
=
datasize
-
used
;
r
=
msi_id2stringA
(
st
,
i
,
data
+
used
,
&
sz
);
if
(
r
!=
ERROR_SUCCESS
)
...
...
dlls/msi/tests/db.c
View file @
22743883
...
...
@@ -4253,10 +4253,7 @@ static void test_stringtable(void)
sz
=
sizeof
(
buffer
);
r
=
MsiRecordGetString
(
hrec
,
2
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
{
ok
(
!
lstrcmp
(
buffer
,
"five"
),
"Expected five, got %s
\n
"
,
buffer
);
}
ok
(
!
lstrcmp
(
buffer
,
"five"
),
"Expected five, got %s
\n
"
,
buffer
);
r
=
MsiCloseHandle
(
hrec
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
...
...
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