[PATCH] winspool.drv: Assign an empty port if not found in registry.
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Thu Oct 6 03:41:17 CDT 2016
Fixes: https://bugs.winehq.org/show_bug.cgi?id=33502
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
dlls/winspool.drv/info.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c
index 4dea531..26184c2 100644
--- a/dlls/winspool.drv/info.c
+++ b/dlls/winspool.drv/info.c
@@ -4318,6 +4318,18 @@ static BOOL WINSPOOL_GetPrinter_5(HKEY hkeyPrinter, PRINTER_INFO_5W *pi5,
space = FALSE;
*pcbNeeded += size;
}
+ else
+ {
+ /* Assign an empty port */
+ if(space && size <= left) {
+ pi5->pPortName = (LPWSTR)ptr;
+ *pi5->pPortName = '\0';
+ ptr += sizeof(WCHAR);
+ left -= sizeof(WCHAR);
+ } else
+ space = FALSE;
+ *pcbNeeded += sizeof(WCHAR);
+ }
if(pi5) {
pi5->Attributes = get_dword_from_reg( hkeyPrinter, AttributesW );
pi5->DeviceNotSelectedTimeout = get_dword_from_reg( hkeyPrinter, dnsTimeoutW );
--
1.9.1
More information about the wine-patches
mailing list