From: Nicholas Clark Date: Sun, 7 Apr 2002 15:01:56 +0000 (+0100) Subject: Re: [PATCH] Re: perl@15772 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=342312103582a8a58459fd4abec7514aa866d334;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH] Re: perl@15772 Message-ID: <20020407150156.R10686@plum.flirble.org> p4raw-id: //depot/perl@15786 --- diff --git a/ext/Data/Dumper/Dumper.xs b/ext/Data/Dumper/Dumper.xs index bc2b454..20e4af8 100644 --- a/ext/Data/Dumper/Dumper.xs +++ b/ext/Data/Dumper/Dumper.xs @@ -136,7 +136,8 @@ esc_q_utf8(pTHX_ SV* sv, register char *src, register STRLEN slen) } if (grow) { /* We have something needing hex. 3 is ""\0 */ - sv_grow(sv, cur+3+grow+2*qq_escapables+2*backslashes+normal); + sv_grow(sv, cur + 3 + grow + 2*backslashes + single_quotes + + 2*qq_escapables + normal); rstart = r = SvPVX(sv) + cur; *r++ = '"'; @@ -157,7 +158,8 @@ esc_q_utf8(pTHX_ SV* sv, register char *src, register STRLEN slen) *r++ = '"'; } else { /* Single quotes. */ - sv_grow(sv, cur+3+grow+2*single_quotes+2*backslashes+normal); + sv_grow(sv, cur + 3 + 2*backslashes + 2*single_quotes + + qq_escapables + normal); rstart = r = SvPVX(sv) + cur; *r++ = '\''; for (s = src; s < send; s ++) {