>From 284cbbd2032eb0789fc5f1ca58630c4430d1db91 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sat, 30 Oct 2010 01:37:38 +0400 Subject: [PATCH] Compare encoding pointer with a null instead of xmlCharEncoding element --- parser.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/parser.c b/parser.c index 1db706b..e8cd123 100644 --- a/parser.c +++ b/parser.c @@ -6609,7 +6609,7 @@ xmlParseExternalSubset(xmlParserCtxtPtr ctxt, const xmlChar *ExternalID, xmlDetectSAX2(ctxt); GROW; - if ((ctxt->encoding == (const xmlChar *)XML_CHAR_ENCODING_NONE) && + if ((ctxt->encoding == NULL) && (ctxt->input->end - ctxt->input->cur >= 4)) { xmlChar start[4]; xmlCharEncoding enc; @@ -10105,7 +10105,7 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) { if ((ctxt->sax) && (ctxt->sax->setDocumentLocator)) ctxt->sax->setDocumentLocator(ctxt->userData, &xmlDefaultSAXLocator); - if ((ctxt->encoding == (const xmlChar *)XML_CHAR_ENCODING_NONE) && + if ((ctxt->encoding == NULL) && ((ctxt->input->end - ctxt->input->cur) >= 4)) { /* * Get the 4 first bytes and decode the charset -- 1.5.6.5