From: Nicholas Clark Date: Wed, 11 Jan 2006 12:11:03 +0000 (+0000) Subject: Gisle notes that SvRTRIM should also write a new '\0' at the end. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bb4058bb936dbf9d1160c9511e5977b96d967664;p=p5sagit%2Fp5-mst-13.2.git Gisle notes that SvRTRIM should also write a new '\0' at the end. p4raw-id: //depot/perl@26781 --- diff --git a/mg.c b/mg.c index 87cea48..603e8ac 100644 --- a/mg.c +++ b/mg.c @@ -647,6 +647,7 @@ Perl_magic_len(pTHX_ SV *sv, MAGIC *mg) while (len > 0 && isSPACE(p[len-1])) \ --len; \ SvCUR_set(sv, len); \ + p[len] = '\0'; \ } STMT_END int