You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by ra...@apache.org on 2005/12/06 18:43:32 UTC

svn commit: r354480 - /xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Saver.java

Author: radup
Date: Tue Dec  6 09:43:28 2005
New Revision: 354480

URL: http://svn.apache.org/viewcvs?rev=354480&view=rev
Log:
Update to TextSaver - if circular buffer had exactly as many characters left at end as you were trying to insert using replace() method then the buffer became corrupted.

Contributed by Lawrence Jones

Modified:
    xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Saver.java

Modified: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Saver.java
URL: http://svn.apache.org/viewcvs/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Saver.java?rev=354480&r1=354479&r2=354480&view=diff
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Saver.java (original)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Saver.java Tue Dec  6 09:43:28 2005
@@ -1461,7 +1461,7 @@
             {
                 assert i < _in;
                 int availableEndChunk = _buf.length - _in;
-                if ( dCch < availableEndChunk )
+                if ( dCch <= availableEndChunk )
                 {
                     System.arraycopy( _buf, i, _buf, i + dCch, _in - i );
                     _in += dCch;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org