Fixed out of scope compile bug.

This commit is contained in:
evaughan%netscape.com 1999-02-19 20:12:08 +00:00
parent 9fdd919eab
commit 4aeb615bb6

View File

@ -511,7 +511,8 @@ nsTitledButtonFrame::CalculateTitleForWidth(nsIPresContext& aPresContext, nsIRen
nscoord cwidth;
nscoord twidth = 0;
int length = mTitle.Length();
for (int i=0; i < length; i++)
int i = 0;
for (i = 0; i < length; i++)
{
PRUnichar ch = mTitle[i];
aRenderingContext.GetWidth(ch,cwidth);
@ -537,7 +538,8 @@ nsTitledButtonFrame::CalculateTitleForWidth(nsIPresContext& aPresContext, nsIRen
nscoord cwidth;
nscoord twidth = 0;
int length = mTitle.Length();
for (int i=length-1; i >= 0; i--)
int i = length-1;
for (i=length-1; i >= 0; i--)
{
PRUnichar ch = mTitle[i];
aRenderingContext.GetWidth(ch,cwidth);