Author: cfinck
Date: Wed May 6 13:00:08 2015
New Revision: 67577
URL:
http://svn.reactos.org/svn/reactos?rev=67577&view=rev
Log:
Fix copying of structure values in OpenPrinterA
Modified:
branches/colins-printing-for-freedom/reactos/win32ss/printing/base/winspool/main.c
Modified:
branches/colins-printing-for-freedom/reactos/win32ss/printing/base/winspool/main.c
URL:
http://svn.reactos.org/svn/reactos/branches/colins-printing-for-freedom/rea…
==============================================================================
---
branches/colins-printing-for-freedom/reactos/win32ss/printing/base/winspool/main.c [iso-8859-1]
(original)
+++
branches/colins-printing-for-freedom/reactos/win32ss/printing/base/winspool/main.c [iso-8859-1]
Wed May 6 13:00:08 2015
@@ -213,8 +213,8 @@
MultiByteToWideChar(CP_ACP, 0, pDefault->pDevMode->dmFormName, -1,
wDevMode.dmFormName, sizeof(wDevMode.dmFormName) / sizeof(WCHAR));
// Use CopyMemory to copy over several structure values in one step
- CopyMemory(&wDevMode.dmSpecVersion,
&pDefault->pDevMode->dmSpecVersion, (ULONG_PTR)&wDevMode.dmCollate -
(ULONG_PTR)&wDevMode.dmSpecVersion);
- CopyMemory(&wDevMode.dmLogPixels,
&pDefault->pDevMode->dmLogPixels, (ULONG_PTR)&wDevMode.dmPanningHeight -
(ULONG_PTR)&wDevMode.dmLogPixels);
+ CopyMemory(&wDevMode.dmSpecVersion,
&pDefault->pDevMode->dmSpecVersion, (ULONG_PTR)&wDevMode.dmCollate -
(ULONG_PTR)&wDevMode.dmSpecVersion + sizeof(wDevMode.dmCollate));
+ CopyMemory(&wDevMode.dmLogPixels,
&pDefault->pDevMode->dmLogPixels, (ULONG_PTR)&wDevMode.dmPanningHeight -
(ULONG_PTR)&wDevMode.dmLogPixels + sizeof(wDevMode.dmPanningHeight));
wDefault.pDevMode = &wDevMode;
}