partial fix fo bug 27910, encoding on mac was coming up wrong

This commit is contained in:
morse%netscape.com 2000-02-16 02:33:13 +00:00
parent 2461b8a211
commit 7a2ae218cd

View File

@ -91,7 +91,7 @@ NS_IMETHODIMP nsBasicStreamGenerator::GetByte(PRUint32 offset, PRUint8 *retval)
* depending on whether or not this routine was called an odd or an even number of times
*/
PRUnichar ret16 = mPassword.CharAt((mState>>1) % mPassword.Length());
if ((mState++) & 1) {
if (!((mState++) & 1)) {
ret16 = ret16>>8;
}
*retval = (PRUint8)(ret16 & 0xff);