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
my $no_signedness = $] > 5.009 ? '' :
"Signed/unsigned pack modifiers not available on this perl";
-plan tests => 14699;
+plan tests => 14700;
use strict;
use warnings qw(FATAL all);
my $y = runperl( prog => 'print split( /,/, unpack(q(%32u*), q(#,3,Q)), qq(\n)), qq(\n)' );
is($y, "0\n", "split /a/, unpack('%32u*'...) didn't crash");
}
+
+#90160
+is(eval { () = unpack "C0 U*", ""; "ok" }, "ok",
+ 'medial U* on empty string');