From 2c255ba0e62880bd3e1f8ae64fd51519732353da Mon Sep 17 00:00:00 2001 From: James Clark Date: Wed, 5 Jul 2000 10:30:04 +0000 Subject: [PATCH] Fix bug with xml prefix. --- expat/xmlparse/xmlparse.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/expat/xmlparse/xmlparse.c b/expat/xmlparse/xmlparse.c index da0cfd48..d11a1462 100755 --- a/expat/xmlparse/xmlparse.c +++ b/expat/xmlparse/xmlparse.c @@ -3376,10 +3376,12 @@ int setContext(XML_Parser parser, const XML_Char *context) prefix = (PREFIX *)lookup(&dtd.prefixes, poolStart(&tempPool), sizeof(PREFIX)); if (!prefix) return 0; - if (prefix->name == poolStart(&tempPool)) - poolFinish(&tempPool); - else - poolDiscard(&tempPool); + if (prefix->name == poolStart(&tempPool)) { + prefix->name = poolCopyString(&dtd.pool, prefix->name); + if (!prefix->name) + return 0; + } + poolDiscard(&tempPool); } for (context = s + 1; *context != CONTEXT_SEP && *context != XML_T('\0'); context++) if (!poolAppendChar(&tempPool, *context)) -- 2.40.0