diff dwtx/jface/text/rules/BufferedRuleBasedScanner.d @ 162:1a5b8f8129df

...
author Frank Benoit <benoit@tionex.de>
date Mon, 08 Sep 2008 00:51:37 +0200
parents eb21d3dfc767
children eb98a5cbfd78
line wrap: on
line diff
--- a/dwtx/jface/text/rules/BufferedRuleBasedScanner.d	Wed Aug 27 14:49:30 2008 +0200
+++ b/dwtx/jface/text/rules/BufferedRuleBasedScanner.d	Mon Sep 08 00:51:37 2008 +0200
@@ -58,7 +58,7 @@
     /** The actual size of the buffer. Initially set to <code>DEFAULT_BUFFER_SIZE</code> */
     private int fBufferSize= DEFAULT_BUFFER_SIZE;
     /** The buffer */
-    private char[] fBuffer= new char[DEFAULT_BUFFER_SIZE];
+    private char[] fBuffer;
     /** The offset of the document at which the buffer starts */
     private int fStart;
     /** The offset of the document at which the buffer ends */
@@ -73,6 +73,8 @@
      */
     protected this() {
         super();
+        fBuffer= new char[DEFAULT_BUFFER_SIZE];
+        fBuffer[] = 0;
     }
 
     /**
@@ -84,6 +86,8 @@
      */
     public this(int size) {
         super();
+        fBuffer= new char[DEFAULT_BUFFER_SIZE];
+        fBuffer[] = 0;
         setBufferSize(size);
     }
 
@@ -96,6 +100,7 @@
         Assert.isTrue(size > 0);
         fBufferSize= size;
         fBuffer= new char[size];
+        fBuffer[] = 0;
     }
 
     /**