openbsd-ports/x11/wxWidgets/patches/patch-src_common_cmndata_cpp
todd b25888b419 wxWidgets 2.4.2, C++ cross-platform GUI toolkit
www: http://www.wxwidgets.org/

from Andrew Dalgleish   < openbsd at ajd dot net dot au >
many thanks for much persistence!
2004-07-16 21:01:35 +00:00

14 lines
599 B
Plaintext

$OpenBSD: patch-src_common_cmndata_cpp,v 1.1.1.1 2004/07/16 21:01:35 todd Exp $
--- src/common/cmndata.cpp.orig Tue Jun 3 23:58:10 2003
+++ src/common/cmndata.cpp Thu Jun 26 11:05:09 2003
@@ -476,8 +476,7 @@ void wxPrintData::ConvertToNative()
if (m_printerName != wxT(""))
{
//int len = wxMin(31, m_printerName.Len());
- wxStrncpy((wxChar*)devMode->dmDeviceName,m_printerName.c_str(),31);
- devMode->dmDeviceName[31] = wxT('\0');
+ strlcpy((wxChar*)devMode->dmDeviceName,m_printerName.c_str(), 32);
}
//// Colour