r=harishd. sr=vidur. Fix for bug 44094. Fixes off by one error in column number in XML error message.
git-svn-id: svn://10.0.0.236/trunk@87783 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -320,7 +320,7 @@ CreateSourceText(const nsParserError* aError, nsString& aSourceString)
|
||||
|
||||
aSourceString.Append(aError->sourceLine);
|
||||
aSourceString.AppendWithConversion("\n");
|
||||
for (int i = 0; i < errorPosition; i++)
|
||||
for (PRInt32 i = 0; i < errorPosition - 1; i++)
|
||||
aSourceString.AppendWithConversion("-");
|
||||
aSourceString.AppendWithConversion("^");
|
||||
|
||||
@@ -399,7 +399,8 @@ nsExpatTokenizer::PushXMLErrorTokens(const char *aBuffer, PRUint32 aLength, PRBo
|
||||
/* Fill in the values of the error token */
|
||||
error->code = XML_GetErrorCode(mExpatParser);
|
||||
error->lineNumber = XML_GetCurrentLineNumber(mExpatParser);
|
||||
error->colNumber = XML_GetCurrentColumnNumber(mExpatParser);
|
||||
// Adjust the column number so that it is one based rather than zero based.
|
||||
error->colNumber = XML_GetCurrentColumnNumber(mExpatParser) + 1;
|
||||
error->description.AssignWithConversion(XML_ErrorString(error->code));
|
||||
if (!aIsFinal) {
|
||||
PRInt32 byteIndexRelativeToFile = 0;
|
||||
|
||||
Reference in New Issue
Block a user