]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't copy the NULL char into the clipboard. Most Mac apps will
authorRobin Dunn <robin@alldunn.com>
Wed, 4 May 2005 21:04:32 +0000 (21:04 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 4 May 2005 21:04:32 +0000 (21:04 +0000)
treat it as a legitimate, but invisible character and various problems
arise...

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/clipbrd.cpp

index cda81e29bb5844522846aff0eb45e5de09431361..4267942472a93c7b554a03b4036936dbaaabef38 100644 (file)
@@ -251,10 +251,12 @@ bool wxClipboard::AddData( wxDataObject *data )
                case wxDF_TEXT:
                case wxDF_OEMTEXT:
                     mactype = kScrapFlavorTypeText ;
+                    sz -= 1;
                break ;
     #if wxUSE_UNICODE
                case wxDF_UNICODETEXT :
                     mactype = kScrapFlavorTypeUnicode ;
+                    sz -= 2;
                break ;
     #endif
     #if wxUSE_DRAG_AND_DROP