aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32
diff options
context:
space:
mode:
authornyamatongwe <unknown>2010-04-03 09:09:33 +0000
committernyamatongwe <unknown>2010-04-03 09:09:33 +0000
commite4bb0be5d3481c8a83c2e0adfb0d931a831622c1 (patch)
treeafc25f523fdbc68bd2b15eb1122499bbe5e7795c /win32
parentd34b5767ceccbc99a3208c65866c53522337828c (diff)
downloadscintilla-mirror-e4bb0be5d3481c8a83c2e0adfb0d931a831622c1.tar.gz
NUL characters in text formats on clipboard terminate the text.
This is a reversion to 2.03 behaviour because of other applications using large clipboard allocations for small pieces of text.
Diffstat (limited to 'win32')
-rw-r--r--win32/ScintillaWin.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index a14b8d01b..75957d073 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -1567,10 +1567,10 @@ void ScintillaWin::Paste() {
// CF_UNICODETEXT available, but not in Unicode mode
// Convert from Unicode to current Scintilla code page
UINT cpDest = CodePageOfDocument();
- len = ::WideCharToMultiByte(cpDest, 0, uptr, memUSelection.Size() / 2,
+ len = ::WideCharToMultiByte(cpDest, 0, uptr, -1,
NULL, 0, NULL, NULL) - 1; // subtract 0 terminator
putf = new char[len + 1];
- ::WideCharToMultiByte(cpDest, 0, uptr, memUSelection.Size() / 2,
+ ::WideCharToMultiByte(cpDest, 0, uptr, -1,
putf, len + 1, NULL, NULL);
}