projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de793ea
)
[WINSPOOL] Convert the returned Unicode string back to ANSI in GetDefaultPrinterA.
author
Colin Finck
<colin@reactos.org>
Sat, 9 Dec 2017 09:59:40 +0000
(10:59 +0100)
committer
Colin Finck
<colin@reactos.org>
Sat, 9 Dec 2017 13:14:05 +0000
(14:14 +0100)
Thanks to Mark for the hint in CORE-14072!
win32ss/printing/base/winspool/printers.c
patch
|
blob
|
history
diff --git
a/win32ss/printing/base/winspool/printers.c
b/win32ss/printing/base/winspool/printers.c
index
0441ff3
..
2abd5c3
100644
(file)
--- a/
win32ss/printing/base/winspool/printers.c
+++ b/
win32ss/printing/base/winspool/printers.c
@@
-449,6
+449,9
@@
GetDefaultPrinterA(LPSTR pszBuffer, LPDWORD pcchBuffer)
goto Cleanup;
}
+ // We successfully got a string in pwszBuffer, so convert the Unicode string to ANSI.
+ WideCharToMultiByte(CP_ACP, 0, pwszBuffer, -1, pszBuffer, *pcchBuffer, NULL, NULL);
+
dwErrorCode = ERROR_SUCCESS;
Cleanup: