X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp_pack.c;h=ceb01c5a57ee822ff2292a6649aacdf91383f5a2;hb=c721372142d4c809beb9dbba1d6d9e8702004478;hp=021c35c7373cc00d576f539b3364843f27511968;hpb=d50dd4e4eaf05f186e67ce979ed880c59f1a81bc;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp_pack.c b/pp_pack.c index 021c35c..ceb01c5 100644 --- a/pp_pack.c +++ b/pp_pack.c @@ -922,6 +922,8 @@ PP(pp_unpack) } break; case 'P': + if (star) + DIE(aTHX_ "P must have an explicit size"); EXTEND(SP, 1); if (sizeof(char*) > strend - s) break; @@ -1386,7 +1388,7 @@ PP(pp_pack) case 'a': fromstr = NEXTFROM; aptr = SvPV(fromstr, fromlen); - if (pat[-1] == '*') { + if (pat[lengthcode ? -2 : -1] == '*') { /* -2 after '/' */ len = fromlen; if (datumtype == 'Z') ++len;