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
725c7aec
Commit
725c7aec
authored
Aug 14, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Aug 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Fix evaluation of LIKE queries.
parent
8d690e7e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
query.c
dlls/wbemprox/query.c
+3
-3
query.c
dlls/wbemprox/tests/query.c
+5
-1
No files found.
dlls/wbemprox/query.c
View file @
725c7aec
...
...
@@ -63,10 +63,10 @@ static BOOL eval_like( const WCHAR *lstr, const WCHAR *rstr )
{
while
(
*
q
==
'%'
)
q
++
;
if
(
!*
q
)
return
TRUE
;
while
(
*
p
&&
toupperW
(
p
[
1
]
)
!=
toupperW
(
q
[
1
]
))
p
++
;
if
(
!*
p
)
return
TRUE
;
while
(
*
p
&&
*
q
&&
toupperW
(
*
p
)
==
toupperW
(
*
q
))
{
p
++
;
q
++
;
}
;
if
(
!*
p
&&
!*
q
)
return
TRUE
;
}
if
(
toupperW
(
*
p
++
)
!=
toupperW
(
*
q
++
))
return
FALSE
;
if
(
*
q
!=
'%'
&&
toupperW
(
*
p
++
)
!=
toupperW
(
*
q
++
))
return
FALSE
;
}
return
TRUE
;
}
...
...
dlls/wbemprox/tests/query.c
View file @
725c7aec
...
...
@@ -98,7 +98,11 @@ static void test_select( IWbemServices *services )
'\"'
,
'\\'
,
'\\'
,
'\\'
,
'\\'
,
'.'
,
'\\'
,
'\\'
,
'P'
,
'H'
,
'Y'
,
'S'
,
'I'
,
'C'
,
'A'
,
'L'
,
'D'
,
'R'
,
'I'
,
'V'
,
'E'
,
'0'
,
'\"'
,
0
};
static
const
WCHAR
query9
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
'\n'
,
'a'
,
'\r'
,
'F'
,
'R'
,
'O'
,
'M'
,
'\t'
,
'b'
,
0
};
static
const
WCHAR
*
test
[]
=
{
query1
,
query2
,
query3
,
query4
,
query5
,
query6
,
query7
,
query8
,
query9
};
static
const
WCHAR
query10
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'W'
,
'i'
,
'n'
,
'3'
,
'2'
,
'_'
,
'P'
,
'r'
,
'o'
,
'c'
,
'e'
,
's'
,
's'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'C'
,
'a'
,
'p'
,
't'
,
'i'
,
'o'
,
'n'
,
' '
,
'L'
,
'I'
,
'K'
,
'E'
,
' '
,
'"'
,
'%'
,
'f'
,
'i'
,
'r'
,
'e'
,
'f'
,
'o'
,
'x'
,
'.'
,
'e'
,
'x'
,
'e'
,
'"'
,
0
};
static
const
WCHAR
*
test
[]
=
{
query1
,
query2
,
query3
,
query4
,
query5
,
query6
,
query7
,
query8
,
query9
,
query10
};
HRESULT
hr
;
IEnumWbemClassObject
*
result
;
BSTR
wql
=
SysAllocString
(
wqlW
);
...
...
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