diff --git a/mozilla/htmlparser/src/nsExpatTokenizer.cpp b/mozilla/htmlparser/src/nsExpatTokenizer.cpp
index c9ee2506deb..4af92754a7d 100644
--- a/mozilla/htmlparser/src/nsExpatTokenizer.cpp
+++ b/mozilla/htmlparser/src/nsExpatTokenizer.cpp
@@ -205,7 +205,7 @@ void nsExpatTokenizer::SetErrorContextInfo(nsParserError* aError, PRUint32 aByte
/* At this point, the substring starting at (startIndex + 1) and ending at (endIndex - 1),
is the line on which the error occurred. Copy that substring into the error structure. */
- aError->sourceLine.Append((const PRUnichar* )&aSourceBuffer[startIndex + (1 * sizeof(XML_Char))], (endIndex - 1) - startIndex);
+ aError->sourceLine.Append((const PRUnichar* )&aSourceBuffer[(startIndex + 1) * sizeof(XML_Char)], (endIndex - 1) - startIndex);
}
}
diff --git a/mozilla/parser/htmlparser/src/nsExpatTokenizer.cpp b/mozilla/parser/htmlparser/src/nsExpatTokenizer.cpp
index c9ee2506deb..4af92754a7d 100644
--- a/mozilla/parser/htmlparser/src/nsExpatTokenizer.cpp
+++ b/mozilla/parser/htmlparser/src/nsExpatTokenizer.cpp
@@ -205,7 +205,7 @@ void nsExpatTokenizer::SetErrorContextInfo(nsParserError* aError, PRUint32 aByte
/* At this point, the substring starting at (startIndex + 1) and ending at (endIndex - 1),
is the line on which the error occurred. Copy that substring into the error structure. */
- aError->sourceLine.Append((const PRUnichar* )&aSourceBuffer[startIndex + (1 * sizeof(XML_Char))], (endIndex - 1) - startIndex);
+ aError->sourceLine.Append((const PRUnichar* )&aSourceBuffer[(startIndex + 1) * sizeof(XML_Char)], (endIndex - 1) - startIndex);
}
}