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
f8a0f90e
Commit
f8a0f90e
authored
May 10, 2016
by
Piotr Caban
Committed by
Alexandre Julliard
May 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp110: Fix Yarn::operator=(const char*) implementation.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ed79f458
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
18 deletions
+22
-18
string.c
dlls/msvcp90/string.c
+22
-18
No files found.
dlls/msvcp90/string.c
View file @
f8a0f90e
...
...
@@ -1644,17 +1644,19 @@ _Yarn_char* __thiscall _Yarn_char_op_assign_cstr(_Yarn_char *this, const char *s
{
TRACE
(
"(%p %p)
\n
"
,
this
,
str
);
_Yarn_char__Tidy
(
this
);
if
(
str
)
{
MSVCP_size_t
len
=
strlen
(
str
);
this
->
str
=
MSVCRT_operator_new
((
len
+
1
)
*
sizeof
(
char
));
if
(
!
this
->
str
)
{
ERR
(
"out of memory
\n
"
);
return
NULL
;
if
(
str
!=
this
->
str
)
{
_Yarn_char__Tidy
(
this
);
if
(
str
)
{
MSVCP_size_t
len
=
strlen
(
str
);
this
->
str
=
MSVCRT_operator_new
((
len
+
1
)
*
sizeof
(
char
));
if
(
!
this
->
str
)
{
ERR
(
"out of memory
\n
"
);
return
NULL
;
}
memcpy
(
this
->
str
,
str
,
(
len
+
1
)
*
sizeof
(
char
));
}
memcpy
(
this
->
str
,
str
,
(
len
+
1
)
*
sizeof
(
char
));
}
return
this
;
}
...
...
@@ -1762,17 +1764,19 @@ _Yarn_wchar* __thiscall _Yarn_wchar_op_assign_cstr(_Yarn_wchar *this, const wcha
{
TRACE
(
"(%p %p)
\n
"
,
this
,
str
);
_Yarn_wchar__Tidy
(
this
);
if
(
str
!=
this
->
str
)
{
_Yarn_wchar__Tidy
(
this
);
if
(
str
)
{
MSVCP_size_t
len
=
wcslen
(
str
);
if
(
str
)
{
MSVCP_size_t
len
=
wcslen
(
str
);
this
->
str
=
MSVCRT_operator_new
((
len
+
1
)
*
sizeof
(
wchar_t
));
if
(
!
this
->
str
)
{
ERR
(
"out of memory
\n
"
);
return
NULL
;
this
->
str
=
MSVCRT_operator_new
((
len
+
1
)
*
sizeof
(
wchar_t
));
if
(
!
this
->
str
)
{
ERR
(
"out of memory
\n
"
);
return
NULL
;
}
memcpy
(
this
->
str
,
str
,
(
len
+
1
)
*
sizeof
(
wchar_t
));
}
memcpy
(
this
->
str
,
str
,
(
len
+
1
)
*
sizeof
(
wchar_t
));
}
return
this
;
}
...
...
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