]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/printdlg.cpp
Cast needed to fix compilation on 10.4 --This line, and those below,
[wxWidgets.git] / src / msw / printdlg.cpp
index 386be3f50b6d07f0964235d20cf6d23e9042a9f2..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