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
1b672e55
Commit
1b672e55
authored
Nov 19, 2014
by
Sebastian Lackner
Committed by
Alexandre Julliard
Nov 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Fix incorrect usage of CompareString in StrRStrIW.
parent
80d98683
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
string.c
dlls/shlwapi/string.c
+13
-7
No files found.
dlls/shlwapi/string.c
View file @
1b672e55
...
...
@@ -625,6 +625,7 @@ LPSTR WINAPI StrRStrIA(LPCSTR lpszStr, LPCSTR lpszEnd, LPCSTR lpszSearch)
*/
LPWSTR
WINAPI
StrRStrIW
(
LPCWSTR
lpszStr
,
LPCWSTR
lpszEnd
,
LPCWSTR
lpszSearch
)
{
LPWSTR
lpszRet
=
NULL
;
INT
iLen
;
TRACE
(
"(%s,%s)
\n
"
,
debugstr_w
(
lpszStr
),
debugstr_w
(
lpszSearch
));
...
...
@@ -632,18 +633,23 @@ LPWSTR WINAPI StrRStrIW(LPCWSTR lpszStr, LPCWSTR lpszEnd, LPCWSTR lpszSearch)
if
(
!
lpszStr
||
!
lpszSearch
||
!*
lpszSearch
)
return
NULL
;
iLen
=
strlenW
(
lpszSearch
);
if
(
!
lpszEnd
)
lpszEnd
=
lpszStr
+
strlenW
(
lpszStr
);
else
/* reproduce the broken behaviour on Windows */
lpszEnd
+=
min
(
iLen
-
1
,
lstrlenW
(
lpszEnd
));
iLen
=
strlenW
(
lpszSearch
);
while
(
lpszEnd
>
lpszStr
)
while
(
lpszStr
+
iLen
<=
lpszEnd
&&
*
lpszStr
)
{
lpszEnd
--
;
if
(
!
StrCmpNIW
(
lpszEnd
,
lpszSearch
,
iLen
))
return
(
LPWSTR
)
lpszEnd
;
if
(
!
ChrCmpIW
(
*
lpszSearch
,
*
lpszStr
))
{
if
(
!
StrCmpNIW
(
lpszStr
,
lpszSearch
,
iLen
))
lpszRet
=
(
LPWSTR
)
lpszStr
;
}
lpszStr
++
;
}
return
NULL
;
return
lpszRet
;
}
/*************************************************************************
...
...
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