From: Hugo van der Sanden Date: Tue, 29 May 2001 00:23:23 +0000 (+0100) Subject: Re: [ID 20010528.007] "\x{" causes panic:constant overflowed allocated space X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=355860cee8d59b8c0f2cb04b149d96a34a9015ff;p=p5sagit%2Fp5-mst-13.2.git Re: [ID 20010528.007] "\x{" causes panic:constant overflowed allocated space Message-Id: <200105282323.AAA07930@crypt.compulink.co.uk> p4raw-id: //depot/perl@10272 --- diff --git a/toke.c b/toke.c index febb820..b052e9a 100644 --- a/toke.c +++ b/toke.c @@ -1439,14 +1439,14 @@ S_scan_const(pTHX_ char *start) ++s; if (*s == '{') { char* e = strchr(s, '}'); + STRLEN len = 1; /* allow underscores */ + if (!e) { yyerror("Missing right brace on \\x{}"); - e = s; - } - else { - STRLEN len = 1; /* allow underscores */ - uv = (UV)scan_hex(s + 1, e - s - 1, &len); + ++s; + continue; } + uv = (UV)scan_hex(s + 1, e - s - 1, &len); s = e + 1; } else {