aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java
index d278132c61..74eec81209 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java
@@ -109,12 +109,13 @@ public class CombinedHunkHeader extends HunkHeader {
final MutableInteger ptr = new MutableInteger();
ptr.value = nextLF(buf, startOffset, ' ');
- for (int n = 0; n < old.length; n++) {
- old[n].startLine = -parseBase10(buf, ptr.value, ptr);
- if (buf[ptr.value] == ',')
- old[n].lineCount = parseBase10(buf, ptr.value + 1, ptr);
- else
- old[n].lineCount = 1;
+ for (CombinedOldImage o : old) {
+ o.startLine = -parseBase10(buf, ptr.value, ptr);
+ if (buf[ptr.value] == ',') {
+ o.lineCount = parseBase10(buf, ptr.value + 1, ptr);
+ } else {
+ o.lineCount = 1;
+ }
}
newStartLine = parseBase10(buf, ptr.value + 1, ptr);