From 137cc3b3d58b519844a25eaae0127aaf10dfd12c Mon Sep 17 00:00:00 2001 From: "timeless%mac.com" Date: Wed, 2 Jan 2002 00:19:14 +0000 Subject: [PATCH] Bug 117654 [Xlib] Minor issue in nsFontXlibNormal::GetWidth() patch by Roland.Mainz@informatik.med.uni-giessen.de r=timeless --- gfx/src/xlib/nsFontMetricsXlib.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/src/xlib/nsFontMetricsXlib.cpp b/gfx/src/xlib/nsFontMetricsXlib.cpp index 3df8489bafa..3a3327bc940 100644 --- a/gfx/src/xlib/nsFontMetricsXlib.cpp +++ b/gfx/src/xlib/nsFontMetricsXlib.cpp @@ -2081,9 +2081,9 @@ nsFontXlibNormal::GetWidth(const PRUnichar* aString, PRUint32 aLength) aLength, p, bufLen); if ((mFont->min_byte1 == 0) && (mFont->max_byte1 == 0)) - textWidth = XTextWidth(mFont, (char *) buf, len); + textWidth = XTextWidth(mFont, p, len); else - textWidth = XTextWidth16(mFont, buf, len / 2); + textWidth = XTextWidth16(mFont, (XChar2b *)p, len / 2); ENCODER_BUFFER_FREE_IF_NEEDED(p, buf); return textWidth;