From: Adam Dickmeiss Date: Wed, 11 Sep 2013 10:42:02 +0000 (+0200) Subject: Avoid reference to attribute value (not being there) X-Git-Tag: v1.3.62~1 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=ad6db37aced496979244d4e58c479708f396bd84;p=metaproxy-moved-to-github.git Avoid reference to attribute value (not being there) --- diff --git a/src/html_parser.cpp b/src/html_parser.cpp index 3f1a4f4..527faf8 100644 --- a/src/html_parser.cpp +++ b/src/html_parser.cpp @@ -166,8 +166,12 @@ int mp::HTMLParser::Rep::tagAttrs(HTMLParserEvent &event, x[0] = tr; x[1] = 0; if (m_verbose) - printf ("------ attr %.*s=%.*s\n", attr_len, attr_name, - val_len, value); + { + printf("------ attr %.*s", attr_len, attr_name); + if (value) + printf("=%.*s", val_len, value); + printf("\n"); + } event.attribute(name, len, attr_name, attr_len, value, val_len, x); } return i; @@ -195,7 +199,7 @@ int mp::HTMLParser::Rep::tagEnd(HTMLParserEvent &event, { if (m_verbose) printf("------ any tag %s %.*s\n", - close_it ? " close" : "end", tag_len, tag); + close_it ? "close" : "end", tag_len, tag); event.anyTagEnd(tag, tag_len, close_it); i++; }