diff options
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFInputStream.java')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFInputStream.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFInputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFInputStream.java index b6d1848b3a..7db882c074 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFInputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFInputStream.java @@ -262,14 +262,14 @@ public class AutoLFInputStream extends InputStream { return false; } if (detectBinary) { - isBinary = RawText.isBinary(buf, cnt); + isBinary = RawText.isBinary(buf, cnt, cnt < buf.length); passAsIs = isBinary; detectBinary = false; if (isBinary && abortIfBinary) { throw new IsBinaryException(); } if (!passAsIs && forCheckout) { - passAsIs = RawText.isCrLfText(buf, cnt); + passAsIs = RawText.isCrLfText(buf, cnt, cnt < buf.length); } } ptr = 0; |