fixed serious livelock bug in Directory.java
authoradam <adam@megacz.com>
Sat, 3 Jul 2004 01:29:32 +0000 (01:29 +0000)
committeradam <adam@megacz.com>
Sat, 3 Jul 2004 01:29:32 +0000 (01:29 +0000)
darcs-hash:20040703012932-5007d-22b0a1a9c01aaeb12bbab15093e0e9ed192b51fc.gz

src/org/ibex/js/Directory.java

index 5f5ac38..e9f7b95 100644 (file)
@@ -93,7 +93,7 @@ public class Directory extends JS {
             File f2 = new File(f.getAbsolutePath() + File.separatorChar + FileNameEncoder.encode(key));
             if (!f2.exists()) return null;
             if (f2.isDirectory()) return new Directory(f2);
-            char[] chars = new char[(int)f2.length()];
+            char[] chars = new char[((int)f2.length()) * 2];
             int numchars = 0;
             Reader r = new InputStreamReader(new FileInputStream(f2));
             while(true) {