]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/printdlg.cpp
tweak GetAppDir() to recognize more debug build directory suffixes
[wxWidgets.git] / src / msw / printdlg.cpp
index 46d877613e1352ab6441426ac2e336c092a36209..c7bc5edb3e4013b5b397c4b53703d204ca4241f9 100644 (file)
@@ -412,10 +412,9 @@ bool wxWindowsPrintNativeData::TransferFrom( const wxPrintData &data )
         {
             // NB: the cast is needed in the ANSI build, strangely enough
             //     dmDeviceName is BYTE[] and not char[] there
-            wxStrncpy(reinterpret_cast<wxChar *>(devMode->dmDeviceName),
+            wxStrlcpy(reinterpret_cast<wxChar *>(devMode->dmDeviceName),
                       name.wx_str(),
-                      WXSIZEOF(devMode->dmDeviceName) - 1);
-            devMode->dmDeviceName[WXSIZEOF(devMode->dmDeviceName) - 1] = wxT('\0');
+                      WXSIZEOF(devMode->dmDeviceName));
         }
 
         //// Colour
@@ -697,7 +696,7 @@ bool wxWindowsPrintDialog::ConvertToNative( wxPrintDialogData &data )
 
     pd->hwndOwner = NULL;
     pd->hInstance = NULL;
-    pd->lCustData = NULL;
+    pd->lCustData = 0;
     pd->lpfnPrintHook = NULL;
     pd->lpfnSetupHook = NULL;
     pd->lpPrintTemplateName = NULL;