[LOCALSPL, WINPRINT]
authorColin Finck <colin@reactos.org>
Tue, 30 Jun 2015 16:02:26 +0000 (16:02 +0000)
committerColin Finck <colin@reactos.org>
Tue, 30 Jun 2015 16:02:26 +0000 (16:02 +0000)
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
reactos/win32ss/printing/providers/localspl/jobs.c
reactos/win32ss/printing/providers/localspl/printers.c

index bfba281..4e733e9 100644 (file)
@@ -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.
index 773c610..98b9e7d 100644 (file)
@@ -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];
     }
 
index b3a3880..f937c2c 100644 (file)
@@ -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.