New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pack Z0 destroys the character before #7785
Comments
From perl-5.8.0@ton.iguana.beCreated by perl-5.8.0@ton.iguana.beperl -wle 'print for unpack("C*", pack("CZ0", 1, "b"))' This is because a Z0 goes back one position and writes a \0 there After patching: Patch (relative to 5.8.6) Inline Patch--- pp_pack.c.old Sat Jan 29 13:26:27 2005
+++ pp_pack.c Sat Feb 5 18:25:16 2005
@@ -2030,7 +2030,7 @@
}
if ((I32)fromlen >= len) {
sv_catpvn(cat, aptr, len);
- if (datumtype == 'Z')
+ if (datumtype == 'Z' && len > 0)
*(SvEND(cat)-1) = '\0';
}
else { Perl Info
|
From @rgsperl-5.8.0@ton.iguana.be (via RT) wrote:
Thanks, applied to bleadperl as change #23946 (with your example turned |
The RT System itself - Status changed from 'new' to 'open' |
@rgs - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#34062 (status was 'resolved')
Searchable as RT34062$
The text was updated successfully, but these errors were encountered: