80048 r=ftang, sr= kin a= asa. bug to fix non initialization of parameter and non checking of funciton return value.

git-svn-id: svn://10.0.0.236/trunk@95947 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mjudge%netscape.com 2001-05-26 00:26:30 +00:00
parent f7489a308e
commit 3b8e5dd324

View File

@ -1538,9 +1538,8 @@ NS_IMETHODIMP nsRenderingContextWin :: GetWidth(PRUnichar ch, nscoord &aWidth, P
PRUnichar buf[1];
buf[0] = ch;
#ifdef IBMBIDI
WORD charType;
::GetStringTypeW(CT_CTYPE3, &ch, 1, &charType);
if ((charType & C3_DIACRITIC) && !(charType & C3_ALPHA)) {
WORD charType=0;
if (::GetStringTypeW(CT_CTYPE3, &ch, 1, &charType) && (charType & C3_DIACRITIC) && !(charType & C3_ALPHA)) {
// aWidth = 0;
GetWidth(buf, 1, aWidth, aFontID);
aWidth *=-1;