X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dca0f651782d5c2659203c97b3243f613966998d..af27647706cb7ca50cf04814ff867532919a252c:/src/msw/printdlg.cpp?ds=sidebyside diff --git a/src/msw/printdlg.cpp b/src/msw/printdlg.cpp index 9d96491f67..cedf15ad46 100644 --- a/src/msw/printdlg.cpp +++ b/src/msw/printdlg.cpp @@ -420,7 +420,10 @@ bool wxWindowsPrintNativeData::TransferFrom( const wxPrintData &data ) wxString name = data.GetPrinterName(); if (!name.empty()) { - wxStrncpy(devMode->dmDeviceName, name.wx_str(), + // NB: the cast is needed in the ANSI build, strangely enough + // dmDeviceName is BYTE[] and not char[] there + wxStrncpy(wx_reinterpret_cast(wxChar *, devMode->dmDeviceName), + name.wx_str(), WXSIZEOF(devMode->dmDeviceName) - 1); devMode->dmDeviceName[WXSIZEOF(devMode->dmDeviceName) - 1] = wxT('\0'); }