diff options
author | perl-5.8.0@ton.iguana.be <perl-5.8.0@ton.iguana.be> | 2005-02-05 18:09:00 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-02-08 09:31:45 +0000 |
commit | f0df5f8b34ab27424e2b758635888ff39aa69398 (patch) | |
tree | 7dd0757341df08bda8095b4fd8723da63634422f /pp_pack.c | |
parent | 580a9fe1f2eadca33b9bfe7700739a00e7d804ca (diff) | |
download | perl-f0df5f8b34ab27424e2b758635888ff39aa69398.tar.gz |
[perl #34062] pack Z0 destroys the character before
From: perl-5.8.0@ton.iguana.be (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.0.11-34062-107199.19.360569328007@perl.org>
(plus a regression test)
p4raw-id: //depot/perl@23946
Diffstat (limited to 'pp_pack.c')
-rw-r--r-- | pp_pack.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2107,7 +2107,7 @@ S_pack_rec(pTHX_ SV *cat, register tempsym_t* symptr, register SV **beglist, SV } if ((I32)fromlen >= len) { sv_catpvn(cat, aptr, len); - if (datumtype == 'Z') + if (datumtype == 'Z' && len > 0) *(SvEND(cat)-1) = '\0'; } else { |