From 47af39fbf462db5c9ccf41c8d95a16d53fdb94a7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 25 Mar 2008 13:33:35 +0000 Subject: [PATCH] ANSI mode compilation fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/printdlg.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/msw/printdlg.cpp b/src/msw/printdlg.cpp index 9d96491f67..46247dd0bb 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_static_cast(wxChar *, devMode->dmDeviceName), + name.wx_str(), WXSIZEOF(devMode->dmDeviceName) - 1); devMode->dmDeviceName[WXSIZEOF(devMode->dmDeviceName) - 1] = wxT('\0'); } -- 2.47.2