fix bug 117098. fix it for all big endian machine. change the bad casting address code . r=smontagu sr=sfraser. also change oen variable name to make mac debugging easier.

This commit is contained in:
ftang%netscape.com 2002-01-08 00:48:37 +00:00
parent 780648f6b2
commit dcc94866ac

View File

@ -2231,13 +2231,13 @@ static PRInt32 doWriteReverse(const PRUnichar *src, PRInt32 srcLength,
/* we need to find out the destination length of the run,
which will not include the Bidi control characters */
PRInt32 length=srcLength;
PRUnichar c;
PRUnichar ch;
PRBool isBidiControl;
i=0;
do {
c=*src++;
bidiUtils->IsBidiControl(c, &isBidiControl);
ch=*src++;
bidiUtils->IsBidiControl(ch, &isBidiControl);
if(!isBidiControl) {
++i;
}
@ -2277,8 +2277,11 @@ static PRInt32 doWriteReverse(const PRUnichar *src, PRInt32 srcLength,
/* mirror only the base character */
if (!bidiUtils)
; /* default to the original form */
else
bidiUtils->SymmSwap((PRUnichar*)&c);
else {
PRUnichar ch = (PRUnichar)c;
bidiUtils->SymmSwap(&ch);
c = ch;
}
PRInt32 k=0;
UTF_APPEND_CHAR_UNSAFE(dest, k, c);
dest+=k;