diff options
author | Michael Valenta | 2002-05-06 18:54:21 +0000 |
---|---|---|
committer | Michael Valenta | 2002-05-06 18:54:21 +0000 |
commit | b200d90ea1281d7a152b3ac630172b196fafb0a0 (patch) | |
tree | 2a857c3b9c84a8e83794d2c837e71a21df2a3269 | |
parent | 560f72f6b87a90e4a509c194bed78185f4ac5576 (diff) | |
download | eclipse.platform.team-b200d90ea1281d7a152b3ac630172b196fafb0a0.tar.gz eclipse.platform.team-b200d90ea1281d7a152b3ac630172b196fafb0a0.tar.xz eclipse.platform.team-b200d90ea1281d7a152b3ac630172b196fafb0a0.zip |
14840: CVS - CRLF is translated into CRCRLF
- Fixed bug in read(byte[] , int, int) involving provided offset
-rw-r--r-- | bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/streams/CRLFtoLFInputStream.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/streams/CRLFtoLFInputStream.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/streams/CRLFtoLFInputStream.java index ecf856bb5..a5db44884 100644 --- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/streams/CRLFtoLFInputStream.java +++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/streams/CRLFtoLFInputStream.java @@ -95,8 +95,8 @@ public class CRLFtoLFInputStream extends FilterInputStream { count += len; // strip out CR's in CR/LF pairs // pendingByte will be true iff previous byte was a CR - int j = 0; - for (int i = 0; i < count; ++i) { // invariant: j <= i + int j = off; + for (int i = off; i < off + count; ++i) { // invariant: j <= i lastByte = buffer[i]; if (lastByte == '\r') { if (pendingByte) { @@ -113,10 +113,10 @@ public class CRLFtoLFInputStream extends FilterInputStream { } } if (iioe != null) { - iioe.bytesTransferred = j; + iioe.bytesTransferred = j - off; throw iioe; } - return j; + return j - off; } /** |