Browse Source

Fix off-by-one error in concat with fixlastline="yes"

PR: 25464
Obtained from: wang liang


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275773 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 21 years ago
parent
commit
e2a62c3179
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      src/main/org/apache/tools/ant/taskdefs/Concat.java

+ 1
- 2
src/main/org/apache/tools/ant/taskdefs/Concat.java View File

@@ -797,7 +797,6 @@ public class Concat extends Task {
}
continue;
}

int nRead = getReader().read(cbuf, off, len);
if (nRead == -1 || nRead == 0) {
reader.close();
@@ -816,7 +815,7 @@ public class Concat extends Task {
if (i < 0) {
break;
}
addLastChar(cbuf[off + i]);
addLastChar(cbuf[off + i - 1]);
}
}
len -= nRead;


Loading…
Cancel
Save