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
0e6d3b86
Commit
0e6d3b86
authored
Dec 18, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Optimized concatenation of empty strings.
parent
f0c0c142
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
jsstr.c
dlls/jscript/jsstr.c
+7
-4
No files found.
dlls/jscript/jsstr.c
View file @
0e6d3b86
...
...
@@ -72,16 +72,19 @@ jsstr_t *jsstr_concat(jsstr_t *str1, jsstr_t *str2)
jsstr_t
*
ret
;
len1
=
jsstr_length
(
str1
);
if
(
!
len1
)
return
jsstr_addref
(
str2
);
len2
=
jsstr_length
(
str2
);
if
(
!
len2
)
return
jsstr_addref
(
str1
);
ret
=
jsstr_alloc_buf
(
len1
+
len2
);
if
(
!
ret
)
return
NULL
;
if
(
len1
)
memcpy
(
ret
->
str
,
str1
->
str
,
len1
*
sizeof
(
WCHAR
));
if
(
len2
)
memcpy
(
ret
->
str
+
len1
,
str2
->
str
,
len2
*
sizeof
(
WCHAR
));
memcpy
(
ret
->
str
,
str1
->
str
,
len1
*
sizeof
(
WCHAR
));
memcpy
(
ret
->
str
+
len1
,
str2
->
str
,
len2
*
sizeof
(
WCHAR
));
return
ret
;
}
...
...
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