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
029c83d8
Commit
029c83d8
authored
Oct 28, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Oct 28, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error handling in MsiEvaluateCondition.
parent
2fa0dbd5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
cond.y
dlls/msi/cond.y
+15
-13
No files found.
dlls/msi/cond.y
View file @
029c83d8
...
...
@@ -138,6 +138,11 @@ condition:
COND_input
*
cond
=
(
COND_input
*)
info
;
cond
->
result
=
$
1
;
}
|
/*
empty
*/
{
COND_input
*
cond
=
(
COND_input
*)
info
;
cond
->
result
=
MSICONDITION_NONE
;
}
;
expression
:
...
...
@@ -731,6 +736,7 @@ static LPWSTR COND_GetLiteral( struct cond_str *str )
static
int
COND_error
(
const
char
*
str
)
{
TRACE
(
"%s
\n
"
,
str
);
return
0
;
}
...
...
@@ -739,16 +745,17 @@ MSICONDITION MSI_EvaluateConditionW( MSIPACKAGE *package, LPCWSTR szCondition )
COND_input
cond
;
MSICONDITION
r
;
if
(
szCondition
==
NULL
)
return
MSICONDITION_NONE
;
cond
.
package
=
package
;
cond
.
str
=
szCondition
;
cond
.
n
=
0
;
cond
.
result
=
-
1
;
cond
.
result
=
MSICONDITION_ERROR
;
TRACE
(
"Evaluating %s
\n
"
,
debugstr_w
(
szCondition
));
if
(
szCondition
==
NULL
||
szCondition
[
0
]
==
0
)
r
=
MSICONDITION_NONE
;
else
if
(
!COND_parse( &cond ) )
if
(
!COND_parse( &cond ) )
r
=
cond
.
result
;
else
r
=
MSICONDITION_ERROR
;
...
...
@@ -764,7 +771,7 @@ MSICONDITION WINAPI MsiEvaluateConditionW( MSIHANDLE hInstall, LPCWSTR szConditi
package
=
msihandle2msiinfo
(
hInstall
,
MSIHANDLETYPE_PACKAGE
);
if
(
!package)
return
ERROR_INVALID_HANDLE
;
return
MSICONDITION_ERROR
;
ret
=
MSI_EvaluateConditionW
(
package
,
szCondition
);
msiobj_release
(
&
package
->
hdr
);
return
ret
;
...
...
@@ -775,16 +782,11 @@ MSICONDITION WINAPI MsiEvaluateConditionA( MSIHANDLE hInstall, LPCSTR szConditio
LPWSTR
szwCond
=
NULL
;
MSICONDITION
r
;
if
(
szCondition
)
{
UINT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szCondition
,
-
1
,
NULL
,
0
);
szwCond
=
msi_alloc
(
len
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
szCondition
,
-
1
,
szwCond
,
len
);
}
szwCond
=
strdupAtoW
(
szCondition
);
if
(
szCondition
&&
!szwCond )
return
MSICONDITION_ERROR
;
r
=
MsiEvaluateConditionW
(
hInstall
,
szwCond
);
msi_free
(
szwCond
);
return
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