diff options
author | Frank Wagner <frank.wagner@fr.ibm.com> | 2015-01-14 16:18:34 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2015-01-17 23:28:20 +0100 |
commit | e09e7c064e93684aa1ce8f67186e0613bc432d18 (patch) | |
tree | 05b4b96218291609be6552ea3c8dd891c59dd438 /org.eclipse.jgit | |
parent | 05078f5de1691f54f971e3b8cd55bf41a27dd9ef (diff) | |
download | jgit-e09e7c064e93684aa1ce8f67186e0613bc432d18.tar.gz jgit-e09e7c064e93684aa1ce8f67186e0613bc432d18.zip |
Fix RawText.getLineDelimiter() for empty first line
Bug: 456776
Change-Id: Iae50be89ea6d5aee33bd938a937ac5ca578aabca
Signed-off-by: Frank Wagner <frank.wagner@fr.ibm.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java index 55aece3ca9..b26e1bc429 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java @@ -289,7 +289,7 @@ public class RawText extends Sequence { int e = getEnd(0); if (content[e - 1] != '\n') return null; - if (content.length > 1 && content[e - 2] == '\r') + if (content.length > 1 && e > 1 && content[e - 2] == '\r') return "\r\n"; //$NON-NLS-1$ else return "\n"; //$NON-NLS-1$ |