From c4777e50b1af973a0ec27086cf860f4bfb7528bb Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Fri, 2 Aug 2013 17:22:54 +0200 Subject: [PATCH] Fix length evaluation with the last line separator. --- src/fr/devinsy/util/ToolBox.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fr/devinsy/util/ToolBox.java b/src/fr/devinsy/util/ToolBox.java index a090e33..32aa2b6 100644 --- a/src/fr/devinsy/util/ToolBox.java +++ b/src/fr/devinsy/util/ToolBox.java @@ -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();