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
9fcbc544
Commit
9fcbc544
authored
Nov 04, 1999
by
Michael McCormack
Committed by
Alexandre Julliard
Nov 04, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified lstrcpynWtoA to put terminating null at end of string, not
end of buffer.
parent
486dee90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
string.c
memory/string.c
+7
-1
No files found.
memory/string.c
View file @
9fcbc544
...
...
@@ -437,12 +437,18 @@ LPWSTR WINAPI lstrcpynAtoW( LPWSTR dst, LPCSTR src, INT n )
* lstrcpynWtoA (Not a Windows API)
* Note: this function differs from the UNIX strncpy, it _always_ writes
* a terminating \0
*
* The terminating zero should be written at the end of the string, not
* the end of the buffer, as some programs specify the wrong size for
* the buffer (eg. winnt's sol.exe)
*/
LPSTR
WINAPI
lstrcpynWtoA
(
LPSTR
dst
,
LPCWSTR
src
,
INT
n
)
{
if
(
--
n
>=
0
)
{
CRTDLL_wcstombs
(
dst
,
src
,
n
);
n
=
CRTDLL_wcstombs
(
dst
,
src
,
n
);
if
(
n
<
0
)
n
=
0
;
dst
[
n
]
=
0
;
}
return
dst
;
...
...
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