Commit 9f578f6a authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

wineps: Use default devmode if winspool returns fake data.

Fixes regression caused by aa3699dd.
parent 407b01c4
......@@ -644,14 +644,16 @@ static PSDRV_DEVMODE *get_devmode( HANDLE printer, const WCHAR *name, BOOL *is_d
*is_default = FALSE;
if (dm)
if (dm && (dm->dmPublic.dmFields & DefaultDevmode.dmPublic.dmFields) ==
DefaultDevmode.dmPublic.dmFields)
{
TRACE( "Retrieved devmode from winspool\n" );
return dm;
}
TRACE( "Using default devmode\n" );
dm = HeapAlloc( PSDRV_Heap, 0, size );
if (!dm)
dm = HeapAlloc( PSDRV_Heap, 0, size );
if (dm)
{
memcpy( dm, &DefaultDevmode, min(sizeof(DefaultDevmode), size) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment