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
31291ec2
Commit
31291ec2
authored
Mar 31, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Fix building the message string in MSI_ProcessMessage.
parent
0aaf17c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
30 deletions
+32
-30
package.c
dlls/msi/package.c
+32
-30
No files found.
dlls/msi/package.c
View file @
31291ec2
...
...
@@ -1703,8 +1703,7 @@ MSIHANDLE WINAPI MsiGetActiveDatabase(MSIHANDLE hInstall)
return
handle
;
}
INT
MSI_ProcessMessage
(
MSIPACKAGE
*
package
,
INSTALLMESSAGE
eMessageType
,
MSIRECORD
*
record
)
INT
MSI_ProcessMessage
(
MSIPACKAGE
*
package
,
INSTALLMESSAGE
eMessageType
,
MSIRECORD
*
record
)
{
static
const
WCHAR
szActionData
[]
=
{
'A'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
'D'
,
'a'
,
't'
,
'a'
,
0
};
...
...
@@ -1713,10 +1712,9 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
static
const
WCHAR
szActionText
[]
=
{
'A'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
'T'
,
'e'
,
'x'
,
't'
,
0
};
LPWSTR
message
;
DWORD
sz
,
total_size
=
0
,
log_type
=
0
;
INT
i
,
rc
=
0
;
DWORD
i
,
len
,
total_len
,
log_type
=
0
;
INT
rc
=
0
;
char
*
msg
;
int
len
;
TRACE
(
"%x
\n
"
,
eMessageType
);
...
...
@@ -1769,35 +1767,39 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
}
else
{
INT
msg_field
=
1
;
message
=
msi_alloc
(
1
*
sizeof
(
WCHAR
));
message
[
0
]
=
0
;
msg_field
=
MSI_RecordGetFieldCount
(
record
);
for
(
i
=
1
;
i
<=
msg_field
;
i
++
)
static
const
WCHAR
format
[]
=
{
'%'
,
'u'
,
':'
,
' '
,
0
};
UINT
count
=
MSI_RecordGetFieldCount
(
record
);
WCHAR
*
p
;
total_len
=
1
;
for
(
i
=
1
;
i
<=
count
;
i
++
)
{
len
=
0
;
MSI_RecordGetStringW
(
record
,
i
,
NULL
,
&
len
);
total_len
+=
len
+
13
;
}
p
=
message
=
msi_alloc
(
total_len
*
sizeof
(
WCHAR
)
);
if
(
!
p
)
return
ERROR_OUTOFMEMORY
;
for
(
i
=
1
;
i
<=
count
;
i
++
)
{
LPWSTR
tmp
;
WCHAR
number
[
3
];
static
const
WCHAR
format
[]
=
{
'%'
,
'i'
,
':'
,
' '
,
0
};
sz
=
0
;
MSI_RecordGetStringW
(
record
,
i
,
NULL
,
&
sz
);
sz
+=
4
;
total_size
+=
sz
*
sizeof
(
WCHAR
);
tmp
=
msi_alloc
(
sz
*
sizeof
(
WCHAR
));
message
=
msi_realloc
(
message
,
total_size
*
sizeof
(
WCHAR
));
MSI_RecordGetStringW
(
record
,
i
,
tmp
,
&
sz
);
if
(
msg_field
>
1
)
if
(
count
>
1
)
{
sprintfW
(
number
,
format
,
i
);
strcatW
(
message
,
number
);
len
=
sprintfW
(
p
,
format
,
i
);
total_len
-=
len
;
p
+=
len
;
}
len
=
total_len
;
MSI_RecordGetStringW
(
record
,
i
,
p
,
&
len
);
total_len
-=
len
;
p
+=
len
;
if
(
count
>
1
&&
total_len
)
{
*
p
++
=
' '
;
total_len
--
;
}
strcatW
(
message
,
tmp
);
if
(
msg_field
>
1
)
strcatW
(
message
,
szSpace
);
msi_free
(
tmp
);
}
p
[
0
]
=
0
;
}
TRACE
(
"%p %p %p %x %x %s
\n
"
,
gUIHandlerA
,
gUIHandlerW
,
gUIHandlerRecord
,
...
...
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