diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-05-18 14:35:47 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-05-18 14:36:10 -0700 |
commit | c5333953a555847ef4f1457905bf0f111a79eb72 (patch) | |
tree | ed4ecae542122978fa917c8adab4ed0dab72cfe6 /pp_pack.c | |
parent | 3194a40a2b5938cb9768640166e46dd3bc670e0b (diff) | |
download | perl-c5333953a555847ef4f1457905bf0f111a79eb72.tar.gz |
[perl #90160] U* gives ‘U0 mode on an empty string’
This is a regression in 5.10 caused by change 23966/08ca2aa38a29,
which added a bit of faulty logic. It was treating U* in the middle of
a pack template as equivalent to U0, if the input string was empty.
Diffstat (limited to 'pp_pack.c')
-rw-r--r-- | pp_pack.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1660,7 +1660,7 @@ S_unpack_rec(pTHX_ tempsym_t* symptr, const char *s, const char *strbeg, const c break; case 'U': if (len == 0) { - if (explicit_length) { + if (explicit_length && howlen != e_star) { /* Switch to "bytes in UTF-8" mode */ if (symptr->flags & FLAG_DO_UTF8) utf8 = 0; else |