mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 22:20:26 +00:00
winspool.drv: Fix DocumentProperties with empty device name.
This commit is contained in:
parent
401b75e3e9
commit
f63d59d640
@ -2358,7 +2358,7 @@ LONG WINAPI DocumentPropertiesA(HWND hWnd,HANDLE hPrinter,
|
||||
hWnd,hPrinter,pDeviceName,pDevModeOutput,pDevModeInput,fMode
|
||||
);
|
||||
|
||||
if(!pDeviceName) {
|
||||
if(!pDeviceName || !*pDeviceName) {
|
||||
LPCWSTR lpNameW = get_opened_printer_name(hPrinter);
|
||||
if(!lpNameW) {
|
||||
ERR("no name from hPrinter?\n");
|
||||
|
@ -2653,6 +2653,7 @@ static void test_DocumentProperties(void)
|
||||
HANDLE hprn;
|
||||
LONG dm_size, ret;
|
||||
DEVMODE *dm;
|
||||
char empty_str[] = "";
|
||||
|
||||
if (!default_printer)
|
||||
{
|
||||
@ -2678,6 +2679,9 @@ static void test_DocumentProperties(void)
|
||||
ret = DocumentProperties(0, hprn, NULL, dm, dm, DM_OUT_BUFFER);
|
||||
ok(ret == IDOK, "DocumentProperties ret value %d != expected IDOK\n", ret);
|
||||
|
||||
ret = DocumentProperties(0, hprn, empty_str, dm, dm, DM_OUT_BUFFER);
|
||||
ok(ret == IDOK, "DocumentProperties ret value %d != expected IDOK\n", ret);
|
||||
|
||||
test_DEVMODE(dm, dm_size, default_printer);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, dm);
|
||||
|
Loading…
Reference in New Issue
Block a user