[libxml2] wrong message for double hyphen in comment XML error



commit 8658d27d4fc13c2ea1a2d127eb7ce06ac7f8bd19
Author: Bryan Henderson <bryanh giraffe-data com>
Date:   Tue May 8 16:39:05 2012 +0800

    wrong message for double hyphen in comment XML error
    
    The error message when you have a double hyphen in a comment is "comment
    not terminated" and should be "double hyphen in comment".

 parser.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/parser.c b/parser.c
index 9619010..7ea5a88 100644
--- a/parser.c
+++ b/parser.c
@@ -4778,13 +4778,14 @@ get_more:
 		    ctxt->instate = state;
 		    return;
 		}
-		if (buf != NULL)
-		    xmlFatalErrMsgStr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
-		                      "Comment not terminated \n<!--%.50s\n",
+		if (buf != NULL) {
+		    xmlFatalErrMsgStr(ctxt, XML_ERR_HYPHEN_IN_COMMENT,
+		                      "Double hyphen within comment: "
+                                      "<!--%.50s\n",
 				      buf);
-		else
-		    xmlFatalErrMsgStr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
-		                      "Comment not terminated \n", NULL);
+		} else
+		    xmlFatalErrMsgStr(ctxt, XML_ERR_HYPHEN_IN_COMMENT,
+		                      "Double hyphen within comment\n", NULL);
 		in++;
 		ctxt->input->col++;
 	    }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]