summaryrefslogtreecommitdiff
path: root/pp_pack.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-05-18 14:35:47 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-05-18 14:36:10 -0700
commitc5333953a555847ef4f1457905bf0f111a79eb72 (patch)
treeed4ecae542122978fa917c8adab4ed0dab72cfe6 /pp_pack.c
parent3194a40a2b5938cb9768640166e46dd3bc670e0b (diff)
downloadperl-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_pack.c b/pp_pack.c
index 5229fc345e..c62754f86d 100644
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -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