Fix bug with xml prefix.

This commit is contained in:
James Clark 2000-07-05 10:30:04 +00:00
parent 013d3f60a4
commit 2c255ba0e6

View file

@ -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))