aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2010-03-11 10:07:06 +0000
committernyamatongwe <devnull@localhost>2010-03-11 10:07:06 +0000
commit66cc61744a596ee4b04dc568f05e07c3d8207d2a (patch)
tree7ef6a9320c0f7eb0a928f759cd0806d8fc486915 /src
parentae0eb8311f8e25a20cdb48b13de972f504d3bc59 (diff)
downloadscintilla-mirror-66cc61744a596ee4b04dc568f05e07c3d8207d2a.tar.gz
Using passed length rather than 0 termination in case need to process text
containing NULs.
Diffstat (limited to 'src')
-rw-r--r--src/Document.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index 8af819271..954ff9daf 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -845,7 +845,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) && (*sptr != '\0'); i++) {
+ for (size_t i = 0; i < len; i++) {
if (*sptr == '\n' || *sptr == '\r') {
if (eolMode == SC_EOL_CR) {
*dptr++ = '\r';