Bug 339785: When reporting errors about unknown entities in XML literals, do not include append an extra ';' to token buffer as it would not be included in the error message in any case.

This commit is contained in:
igor.bukanov%gmail.com 2006-05-31 19:11:52 +00:00
parent 72df55c274
commit 997bc7e12b

View File

@ -971,9 +971,8 @@ badncr:
msg = JSMSG_BAD_XML_NCR;
bad:
/* No match: throw a TypeError per ECMA-357 10.3.2.1 step 8(a). */
FastAppendChar(&ts->tokenbuf, ';');
bytes = js_DeflateString(cx, bp + 1,
PTRDIFF(ts->tokenbuf.ptr, bp, jschar) - 2);
PTRDIFF(ts->tokenbuf.ptr, bp, jschar) - 1);
if (bytes) {
js_ReportCompileErrorNumber(cx, ts, JSREPORT_TS | JSREPORT_ERROR,
msg, bytes);