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
c6dd1f15
Commit
c6dd1f15
authored
Dec 08, 2007
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: GetConsoleInputExeNameW returns TRUE even when it fails.
parent
d296c185
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
console.c
dlls/kernel32/console.c
+8
-7
No files found.
dlls/kernel32/console.c
View file @
c6dd1f15
...
...
@@ -1013,14 +1013,15 @@ BOOL WINAPI GetConsoleInputExeNameW(DWORD buflen, LPWSTR buffer)
*/
BOOL
WINAPI
GetConsoleInputExeNameA
(
DWORD
buflen
,
LPSTR
buffer
)
{
WCHAR
*
bufferW
;
BOOL
ret
;
TRACE
(
"%u %p
\n
"
,
buflen
,
buffer
);
if
(
!
(
bufferW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
buflen
)))
return
FALSE
;
if
((
ret
=
GetConsoleInputExeNameW
(
buflen
,
bufferW
)))
WideCharToMultiByte
(
CP_ACP
,
0
,
bufferW
,
-
1
,
buffer
,
buflen
,
NULL
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
bufferW
);
return
ret
;
RtlEnterCriticalSection
(
&
CONSOLE_CritSect
);
if
(
WideCharToMultiByte
(
CP_ACP
,
0
,
input_exe
,
-
1
,
NULL
,
0
,
NULL
,
NULL
)
<=
buflen
)
WideCharToMultiByte
(
CP_ACP
,
0
,
input_exe
,
-
1
,
buffer
,
buflen
,
NULL
,
NULL
);
else
SetLastError
(
ERROR_BUFFER_OVERFLOW
);
RtlLeaveCriticalSection
(
&
CONSOLE_CritSect
);
return
TRUE
;
}
/***********************************************************************
...
...
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