diff --git a/layout/generic/nsTextTransformer.cpp b/layout/generic/nsTextTransformer.cpp index e8685c3265d7..d929f22c2c66 100644 --- a/layout/generic/nsTextTransformer.cpp +++ b/layout/generic/nsTextTransformer.cpp @@ -365,7 +365,7 @@ nsTextTransformer::GetNextWord(PRBool aInWord, if (!aInWord && !isWhitespace && (NS_STYLE_TEXT_TRANSFORM_CAPITALIZE == mTextTransform)) { - PRInt32 n = aWordLenResult; + PRInt32 n = wordLen; PRUnichar* bp = mBuffer; for (; --n >= 0; bp++) { PRUnichar ch = *bp; diff --git a/layout/html/base/src/nsTextTransformer.cpp b/layout/html/base/src/nsTextTransformer.cpp index e8685c3265d7..d929f22c2c66 100644 --- a/layout/html/base/src/nsTextTransformer.cpp +++ b/layout/html/base/src/nsTextTransformer.cpp @@ -365,7 +365,7 @@ nsTextTransformer::GetNextWord(PRBool aInWord, if (!aInWord && !isWhitespace && (NS_STYLE_TEXT_TRANSFORM_CAPITALIZE == mTextTransform)) { - PRInt32 n = aWordLenResult; + PRInt32 n = wordLen; PRUnichar* bp = mBuffer; for (; --n >= 0; bp++) { PRUnichar ch = *bp;