X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..3cdcf4d444770f7f0ff2ca64807d8699764ed8b3:/src/msw/printdlg.cpp?ds=sidebyside diff --git a/src/msw/printdlg.cpp b/src/msw/printdlg.cpp index cde8522461..33e9028994 100644 --- a/src/msw/printdlg.cpp +++ b/src/msw/printdlg.cpp @@ -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)