better fix for iterator problem.

This commit is contained in:
pinkerton%netscape.com 1998-09-28 22:34:44 +00:00
parent 7ef6815b7a
commit 9fb7d341f7
2 changed files with 8 additions and 6 deletions

View File

@ -614,11 +614,12 @@ nsFormControlFrame::GetTextSize(nsIPresContext& aPresContext, nsFormControlFrame
{
nsAutoString val;
char char1, char2;
GetRepChars(aPresContext, char1, char2);
for (int i = 0; i < aNumChars; i+=2) {
GetRepChars(aPresContext, char1, char2);
int i;
for (i = 0; i < aNumChars; i+=2) {
val += char1;
}
for (int i = 1; i < aNumChars; i+=2) {
for (i = 1; i < aNumChars; i+=2) {
val += char2;
}
return GetTextSize(aPresContext, aFrame, val, aSize);

View File

@ -614,11 +614,12 @@ nsFormControlFrame::GetTextSize(nsIPresContext& aPresContext, nsFormControlFrame
{
nsAutoString val;
char char1, char2;
GetRepChars(aPresContext, char1, char2);
for (int i = 0; i < aNumChars; i+=2) {
GetRepChars(aPresContext, char1, char2);
int i;
for (i = 0; i < aNumChars; i+=2) {
val += char1;
}
for (int i = 1; i < aNumChars; i+=2) {
for (i = 1; i < aNumChars; i+=2) {
val += char2;
}
return GetTextSize(aPresContext, aFrame, val, aSize);