From 997bc7e12b288d6252ee735ac7158ce9e5df19fd Mon Sep 17 00:00:00 2001 From: "igor.bukanov%gmail.com" Date: Wed, 31 May 2006 19:11:52 +0000 Subject: [PATCH] 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. --- js/src/jsscan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/src/jsscan.c b/js/src/jsscan.c index bf498be5b20f..04740043e814 100644 --- a/js/src/jsscan.c +++ b/js/src/jsscan.c @@ -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);