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
3fa4da76
Commit
3fa4da76
authored
Dec 19, 2011
by
Ken Thomases
Committed by
Alexandre Julliard
Dec 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Have ToUnicodeEx null-terminate the output buffer, if there's room.
parent
c2f3c111
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
keyboard.c
dlls/winex11.drv/keyboard.c
+6
-0
No files found.
dlls/winex11.drv/keyboard.c
View file @
3fa4da76
...
@@ -2680,6 +2680,12 @@ INT CDECL X11DRV_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState
...
@@ -2680,6 +2680,12 @@ INT CDECL X11DRV_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState
found:
found:
if
(
buf
!=
lpChar
)
if
(
buf
!=
lpChar
)
HeapFree
(
GetProcessHeap
(),
0
,
lpChar
);
HeapFree
(
GetProcessHeap
(),
0
,
lpChar
);
/* Null-terminate the buffer, if there's room. MSDN clearly states that the
caller must not assume this is done, but some programs (e.g. Audiosurf) do. */
if
(
1
<=
ret
&&
ret
<
bufW_size
)
bufW
[
ret
]
=
0
;
TRACE_
(
key
)(
"returning %d with %s
\n
"
,
ret
,
debugstr_wn
(
bufW
,
ret
));
TRACE_
(
key
)(
"returning %d with %s
\n
"
,
ret
,
debugstr_wn
(
bufW
,
ret
));
return
ret
;
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