diff options
author | nyamatongwe <unknown> | 2010-04-03 09:09:33 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2010-04-03 09:09:33 +0000 |
commit | e4bb0be5d3481c8a83c2e0adfb0d931a831622c1 (patch) | |
tree | afc25f523fdbc68bd2b15eb1122499bbe5e7795c /src | |
parent | d34b5767ceccbc99a3208c65866c53522337828c (diff) | |
download | scintilla-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 'src')
-rw-r--r-- | src/Document.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index b8ff5a4f9..da566c7af 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -857,7 +857,7 @@ char *Document::TransformLineEnds(int *pLenOut, const char *s, size_t len, int e char *dest = new char[2 * len + 1]; const char *sptr = s; char *dptr = dest; - for (size_t i = 0; i < len; i++) { + for (size_t i = 0; (i < len) && (*sptr != '\0'); i++) { if (*sptr == '\n' || *sptr == '\r') { if (eolMode == SC_EOL_CR) { *dptr++ = '\r'; |