[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: base 64 encode/decode test
From: |
Federico Montesino Pouzols |
Subject: |
Re: base 64 encode/decode test |
Date: |
Fri, 17 Jan 2003 12:53:43 +0100 |
User-agent: |
Mutt/1.4i |
It also fails on GNU/Linux. Looking at the numbers down here,
it does not seem an endian issue. I have committed these changes.
On Tue, Jan 07, 2003 at 12:55:10PM -0800, Chad Yates wrote:
> Here is the test program I promised. On my win32 system and vc++ 6.0 the
> second two tests (testPadding1Short, testPadding2Short) fail unless I change
> part of the b64Decode function like so:
>
> if (c == '=')
> {
> if (bits & 0x40000)
> {
> if (dstsize < 2) break;
> *(pdst++) = (bits >> 10); // changed from '(bits >> 16)'
> *(pdst++) = (bits >> 2) & 0xff; // changed from '(bits >> 8) & 0xff'
> break;
> }
> if (bits & 0x1000 && dstsize)
> *(pdst++) = (bits >> 4); // changed from '(bits >> 10)'
> break;
> }
>
> What I want to know if this is system specific (endian related?) or an
> actual bug.
>
> thanks,
>
> Chad
> _______________________________________________
> Bug-commoncpp mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp