That is indeed a bug. It was ignoring the insertLineBreak parameter 
and inserting a line break at the end. It should be fixed now in CVS.

On Fri, Mar 21, 2003 at 06:01:08AM -0800, Michael Hunley wrote:
> I grabbed from CVS at 5:00am this morning PST.  I am using the Base64 
> encoder and I now get slightly different results than previously.  Has 
> ArraySink::TotalPutLength() changed to fix a bug in how it operated 
> before (in which case I am using it incorrectly).  It used to return 
> the actual encoded size.  Now it returns (in the case I asserted on) 
> the size+1.
> 
>         pBase64Data = new unsigned char[nEncodedSize];
>         ArraySink*      pSink = (ArraySink*) new ArraySink( 
>         pBase64Data, nEncodedSize );
>         StringSource s( pIn, nInBytes, TRUE, new Base64Encoder(pSink, 
> FALSE) );
> 
>         assert( pSink->TotalPutLength()==(unsigned int)nEncodedSize );
> 
> In this example, nEncodedSize=16, nInBytes=12 and TotalPutLength() 
> returns 17.  pSink->size=16, and pSink->total=17.  Is this now correct 
> or is this a bug?  If the former, what should I be using instead of 
> TotalPutLength()?
> 
> thanks.
> 
> 
> Michael Hunley
> Senior Engineer
> PocketPurchase, Inc.  

Reply via email to