Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a0e8d62a
Commit
a0e8d62a
authored
Jun 09, 2015
by
Piotr Caban
Committed by
Alexandre Julliard
Jun 09, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp90: Fix off by one issue in basic_string::rfind.
parent
4f15cc4d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
string.c
dlls/msvcp60/string.c
+4
-4
string.c
dlls/msvcp90/string.c
+4
-4
No files found.
dlls/msvcp60/string.c
View file @
a0e8d62a
...
...
@@ -989,8 +989,8 @@ MSVCP_size_t __thiscall MSVCP_basic_string_char_rfind_cstr_substr(
if
(
len
>
this
->
size
)
return
MSVCP_basic_string_char_npos
;
if
(
pos
>
this
->
size
-
len
+
1
)
pos
=
this
->
size
-
len
+
1
;
if
(
pos
>
this
->
size
-
len
)
pos
=
this
->
size
-
len
;
end
=
this
->
ptr
;
for
(
p
=
end
+
pos
;
p
>=
end
;
p
--
)
{
if
(
*
p
==*
find
&&
!
MSVCP_char_traits_char_compare
(
p
,
find
,
len
))
...
...
@@ -2512,8 +2512,8 @@ MSVCP_size_t __thiscall MSVCP_basic_string_wchar_rfind_cstr_substr(
if
(
len
>
this
->
size
)
return
MSVCP_basic_string_wchar_npos
;
if
(
pos
>
this
->
size
-
len
+
1
)
pos
=
this
->
size
-
len
+
1
;
if
(
pos
>
this
->
size
-
len
)
pos
=
this
->
size
-
len
;
end
=
this
->
ptr
;
for
(
p
=
end
+
pos
;
p
>=
end
;
p
--
)
{
if
(
*
p
==*
find
&&
!
MSVCP_char_traits_wchar_compare
(
p
,
find
,
len
))
...
...
dlls/msvcp90/string.c
View file @
a0e8d62a
...
...
@@ -1542,8 +1542,8 @@ MSVCP_size_t __thiscall MSVCP_basic_string_char_rfind_cstr_substr(
if
(
len
>
this
->
size
)
return
MSVCP_basic_string_char_npos
;
if
(
pos
>
this
->
size
-
len
+
1
)
pos
=
this
->
size
-
len
+
1
;
if
(
pos
>
this
->
size
-
len
)
pos
=
this
->
size
-
len
;
end
=
basic_string_char_const_ptr
(
this
);
for
(
p
=
end
+
pos
;
p
>=
end
;
p
--
)
{
if
(
*
p
==*
find
&&
!
MSVCP_char_traits_char_compare
(
p
,
find
,
len
))
...
...
@@ -3392,8 +3392,8 @@ MSVCP_size_t __thiscall MSVCP_basic_string_wchar_rfind_cstr_substr(
if
(
len
>
this
->
size
)
return
MSVCP_basic_string_wchar_npos
;
if
(
pos
>
this
->
size
-
len
+
1
)
pos
=
this
->
size
-
len
+
1
;
if
(
pos
>
this
->
size
-
len
)
pos
=
this
->
size
-
len
;
end
=
basic_string_wchar_const_ptr
(
this
);
for
(
p
=
end
+
pos
;
p
>=
end
;
p
--
)
{
if
(
*
p
==*
find
&&
!
MSVCP_char_traits_wchar_compare
(
p
,
find
,
len
))
...
...
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