1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 20:06:18 +00:00

winspool.drv: Fix incorrect read of enumerated printer count.

This was changed from a unsigned int to a pointer in
e5d37832ee and this use was missed,
causing prefix creation hang if the allocated printers array is not
filled with zeros.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-11-14 10:20:26 +01:00 committed by Alexandre Julliard
parent a5bea3e89f
commit ff0f5e4024

View File

@ -800,7 +800,7 @@ static BOOL init_unix_printers( void )
if (printer->is_default) default_printer = printer->name;
}
if (!default_printer && enum_params.num) default_printer = enum_params.printers[0].name;
if (!default_printer && num) default_printer = enum_params.printers[0].name;
if (default_printer) SetDefaultPrinterW( default_printer );
if (ppd_dir)