Fix length evaluation with the last line separator.

This commit is contained in:
Christian P. MOMON 2013-08-02 17:22:54 +02:00
parent 0a0f6cd746
commit c4777e50b1

View file

@ -309,7 +309,7 @@ public class ToolBox
boolean ended = false;
final String LINE_SEPARATOR = System.getProperty("line.separator");
result = new StringBuffer((int) file.length());
result = new StringBuffer((int) file.length() + 1);
while (!ended)
{
String line = in.readLine();