X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..233387bdcbb1c4f31c54b0fe6b3f03e8d261cab1:/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)