diff options
author | nyamatongwe <devnull@localhost> | 2010-04-03 09:09:33 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2010-04-03 09:09:33 +0000 |
commit | 74688b8b08b5e8533cd758b34dc3d3929da8ea34 (patch) | |
tree | afc25f523fdbc68bd2b15eb1122499bbe5e7795c /win32/ScintillaWin.cxx | |
parent | 1276e7139c4b750b71f9d11b64da95ede92b0796 (diff) | |
download | scintilla-mirror-74688b8b08b5e8533cd758b34dc3d3929da8ea34.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/ScintillaWin.cxx')
-rw-r--r-- | win32/ScintillaWin.cxx | 4 |
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); } |