Commit d244a55c authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

winspool: Use unsigned type to avoid a compiler warning.

parent 28b32972
...@@ -145,7 +145,7 @@ static struct list monitor_handles = LIST_INIT( monitor_handles ); ...@@ -145,7 +145,7 @@ static struct list monitor_handles = LIST_INIT( monitor_handles );
static monitor_t * pm_localport; static monitor_t * pm_localport;
static opened_printer_t **printer_handles; static opened_printer_t **printer_handles;
static int nb_printer_handles; static UINT nb_printer_handles;
static LONG next_job_id = 1; static LONG next_job_id = 1;
static DWORD (WINAPI *GDI_CallDeviceCapabilities16)( LPCSTR lpszDevice, LPCSTR lpszPort, static DWORD (WINAPI *GDI_CallDeviceCapabilities16)( LPCSTR lpszDevice, LPCSTR lpszPort,
...@@ -1566,11 +1566,9 @@ static opened_printer_t *get_opened_printer(HANDLE hprn) ...@@ -1566,11 +1566,9 @@ static opened_printer_t *get_opened_printer(HANDLE hprn)
EnterCriticalSection(&printer_handles_cs); EnterCriticalSection(&printer_handles_cs);
if ((idx <= 0) || (idx > nb_printer_handles)) if ((idx > 0) && (idx <= nb_printer_handles)) {
goto end; ret = printer_handles[idx - 1];
}
ret = printer_handles[idx - 1];
end:
LeaveCriticalSection(&printer_handles_cs); LeaveCriticalSection(&printer_handles_cs);
return ret; return ret;
} }
......
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