From aef3b57f5551a6353c28eff23ae100571c915d0b Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Tue, 30 Jun 2015 16:02:26 +0000 Subject: [PATCH] [LOCALSPL, WINPRINT] Bugfix: I want to dereference the pointer and then increment its value, not increment the pointer address. svn path=/branches/colins-printing-for-freedom/; revision=68323 --- reactos/win32ss/printing/processors/winprint/main.c | 4 ++-- reactos/win32ss/printing/providers/localspl/jobs.c | 4 ++-- reactos/win32ss/printing/providers/localspl/printers.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/reactos/win32ss/printing/processors/winprint/main.c b/reactos/win32ss/printing/processors/winprint/main.c index bfba2812184..4e733e96fad 100644 --- a/reactos/win32ss/printing/processors/winprint/main.c +++ b/reactos/win32ss/printing/processors/winprint/main.c @@ -131,7 +131,7 @@ EnumPrintProcessorDatatypesW(LPWSTR pName, LPWSTR pPrintProcessorName, DWORD Lev // Also calculate the offset in the output buffer of the pointer to this datatype string. *pCurrentOffset = *pcReturned * sizeof(DATATYPES_INFO_1W) + FIELD_OFFSET(DATATYPES_INFO_1W, pName); - *pcReturned++; + (*pcReturned)++; pCurrentOffset++; } @@ -198,7 +198,7 @@ OpenPrintProcessor(PWSTR pPrinterName, PPRINTPROCESSOROPENDATA pPrintProcessorOp goto Cleanup; } - // Create a new WINPRINT_HANDLE structure. and fill the relevant fields. + // Create a new WINPRINT_HANDLE structure and fill the relevant fields. pHandle = DllAllocSplMem(sizeof(WINPRINT_HANDLE)); // Check what datatype was given. diff --git a/reactos/win32ss/printing/providers/localspl/jobs.c b/reactos/win32ss/printing/providers/localspl/jobs.c index 773c610bd34..98b9e7d4d73 100644 --- a/reactos/win32ss/printing/providers/localspl/jobs.c +++ b/reactos/win32ss/printing/providers/localspl/jobs.c @@ -943,7 +943,7 @@ LocalEnumJobs(HANDLE hPrinter, DWORD FirstJob, DWORD NoJobs, DWORD Level, PBYTE _LocalGetJobLevel2(pPrinterHandle, pJob, NULL, NULL, 0, pcbNeeded); // We stop either when there are no more jobs in the list or when the caller didn't request more, whatever comes first. - *pcReturned++; + (*pcReturned)++; pNode = pNode->Next[0]; } @@ -976,7 +976,7 @@ LocalEnumJobs(HANDLE hPrinter, DWORD FirstJob, DWORD NoJobs, DWORD Level, PBYTE goto Cleanup; // We stop either when there are no more jobs in the list or when the caller didn't request more, whatever comes first. - *pcReturned++; + (*pcReturned)++; pNode = pNode->Next[0]; } diff --git a/reactos/win32ss/printing/providers/localspl/printers.c b/reactos/win32ss/printing/providers/localspl/printers.c index b3a38805ef0..f937c2c0131 100644 --- a/reactos/win32ss/printing/providers/localspl/printers.c +++ b/reactos/win32ss/printing/providers/localspl/printers.c @@ -347,7 +347,7 @@ _LocalEnumPrintersLevel1(DWORD Flags, LPWSTR Name, LPBYTE pPrinterEnum, DWORD cb cbDescription = cchComputerName * sizeof(WCHAR) + cbName + cbComment + sizeof(WCHAR); *pcbNeeded += sizeof(PRINTER_INFO_1W) + cchComputerName * sizeof(WCHAR) + cbName + cbComment + cbDescription; - *pcReturned++; + (*pcReturned)++; } // Check if the supplied buffer is large enough. -- 2.17.1