diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-09-11 13:46:30 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-09-11 13:46:30 +0000 |
commit | 612ff6d18b1d595e802b80e258507dc3b0344768 (patch) | |
tree | e7c84cd9b5df220a0ff70cbd11dd5c00cb9de722 /pcregrep.c | |
parent | b440617f1445f726e9b6dd02ad42fbedc7965f56 (diff) | |
download | pcre-612ff6d18b1d595e802b80e258507dc3b0344768.tar.gz |
Fix line ending missing for pcregrep with --colour.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@239 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcregrep.c')
-rw-r--r-- | pcregrep.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1113,7 +1113,8 @@ while (ptr < endptr) fprintf(stdout, "%c[%sm", 0x1b, colour_string); fwrite(ptr + offsets[0], 1, offsets[1] - offsets[0], stdout); fprintf(stdout, "%c[00m", 0x1b); - fwrite(ptr + offsets[1], 1, linelength - offsets[1], stdout); + fwrite(ptr + offsets[1], 1, (linelength + endlinelength) - offsets[1], + stdout); } else fwrite(ptr, 1, linelength + endlinelength, stdout); } |