<div>line 163:</div>
<div>//////////////////////////</div>
<div>if(endIndex>=GetSize())<br> { <br>  TSize ending=endIndex-GetSize();<br>  memset(chunk.GetBuffer().GetPtr()+GetSize()-beginIndex ,0,ending*sizeof(TData));<br>  endIndex=GetSize();<br> }</div>
<div> </div>
<div>nBytesToCopy=(endIndex-beginIndex+1)*sizeof(double);</div>
<div>//////////////////////////</div>
<div>Maybe it should be changed to the following</div>
<div> </div>
<div>if(endIndex>=GetSize())<br> { <br>  TSize ending=endIndex-GetSize()+1;<br>  memset(chunk.GetBuffer().GetPtr()+GetSize()-beginIndex +offset,0,ending*sizeof(TData));<br>  endIndex=GetSize();<br> }</div>
<div> </div>
<div>and  : size=endIndex-beginIndex; -> size=endIndex-beginIndex+1.<br clear="all"><br>-- <br>Gu Renmin (Charles Neediss)<br>Image, Graph, Video, Speech, Audio, ...<br>CS Dept. of Tongji University, Shanghai, China<br>
Cell:   +(86) 13816064123<br>Work hard, work smart!!!<br> </div>