]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/printdlg.cpp
cleanup - more reformatting; fixed bug introduced in prior commit
[wxWidgets.git] / src / msw / printdlg.cpp
index cde8522461d91596022f4f0fdf0d2bee6669153b..33e9028994c5f783b0fdbabe4e85b822e39cbfbf 100644 (file)
@@ -202,7 +202,8 @@ bool wxWindowsPrintNativeData::TransferTo( wxPrintData &data )
 
         //// Printer name
         if (devMode->dmDeviceName[0] != 0)
-            data.SetPrinterName( devMode->dmDeviceName );
+            // This syntax fixes a crash when using VS 7.1
+            data.SetPrinterName( wxString(devMode->dmDeviceName, CCHDEVICENAME) );
 
         //// Colour
         if (devMode->dmFields & DM_COLOR)