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 /src | |
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 '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'; |