Commit 44d6fec9 authored by Huw D M Davies's avatar Huw D M Davies Committed by Alexandre Julliard

Fix off by one error in WINSPOOL_GetOpenedPrinterA.

parent 1c40562b
......@@ -103,11 +103,12 @@ static LPOPENEDPRINTERA WINSPOOL_GetOpenedPrinterA(int printerHandle)
{
LPOPENEDPRINTERA pOpenedPrinter;
if(!pOpenedPrinterDPA) return NULL;
if((printerHandle <=0) ||
(printerHandle > (pOpenedPrinterDPA->nItemCount - 1)))
return NULL;
pOpenedPrinter = WINSPOOL_DPA_GetPtr(pOpenedPrinterDPA, printerHandle);
pOpenedPrinter = WINSPOOL_DPA_GetPtr(pOpenedPrinterDPA, printerHandle-1);
return pOpenedPrinter;
}
......
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