***DARCS***
[org.ibex.js.git] / src / org / ibex / js / Directory.java
index 9bcc7f6..a44cc77 100644 (file)
@@ -96,7 +96,7 @@ public class Directory extends JS.Immutable {
             File f2 = new File(f.getAbsolutePath() + File.separatorChar + Encode.toFilename(key));
             if (!f2.exists()) return null;
             if (f2.isDirectory()) return new Directory(f2);
-            char[] chars = new char[((int)f2.length()) * 2];
+            char[] chars = new char[((int)f2.length()) * 4 + 10];
             int numchars = 0;
             Reader r = new InputStreamReader(new FileInputStream(f2));
             while(true) {