Fix the crash, contentLen should not be extended futher than the
text fragment's length.


git-svn-id: svn://10.0.0.236/trunk@73957 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
shanjian%netscape.com
2000-07-10 22:32:54 +00:00
parent ecd2e345aa
commit ff9c87f68a
2 changed files with 10 additions and 4 deletions

View File

@@ -3685,8 +3685,11 @@ nsTextFrame::MeasureText(nsIPresContext* aPresContext,
// XXX need a lookup function here; plus look ahead using the
// text-runs
if ((firstChar == '\'') || (firstChar == '\"')) {
wordLen = 2;
contentLen = 2;
if (contentLen > 1)
{
wordLen = 2;
contentLen = 2;
}
}
else {
wordLen = 1;

View File

@@ -3685,8 +3685,11 @@ nsTextFrame::MeasureText(nsIPresContext* aPresContext,
// XXX need a lookup function here; plus look ahead using the
// text-runs
if ((firstChar == '\'') || (firstChar == '\"')) {
wordLen = 2;
contentLen = 2;
if (contentLen > 1)
{
wordLen = 2;
contentLen = 2;
}
}
else {
wordLen = 1;