X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/5637ef5b34a3e8caf72080387a15ea8d81b61baf..e5dc53755b64ecafa7fe3cf49135252b12d56757:/pp_pack.c diff --git a/pp_pack.c b/pp_pack.c index 273908c..909eb45 100644 --- a/pp_pack.c +++ b/pp_pack.c @@ -1690,10 +1690,10 @@ S_unpack_rec(pTHX_ tempsym_t* symptr, const char *s, const char *strbeg, const c len = UTF8SKIP(result); if (!uni_to_bytes(aTHX_ &ptr, strend, (char *) &result[1], len-1, 'U')) break; - auv = utf8n_to_uvuni(result, len, &retlen, ckWARN(WARN_UTF8) ? 0 : UTF8_ALLOW_ANYUV); + auv = utf8n_to_uvuni(result, len, &retlen, UTF8_ALLOW_DEFAULT); s = ptr; } else { - auv = utf8n_to_uvuni((U8*)s, strend - s, &retlen, ckWARN(WARN_UTF8) ? 0 : UTF8_ALLOW_ANYUV); + auv = utf8n_to_uvuni((U8*)s, strend - s, &retlen, UTF8_ALLOW_DEFAULT); if (retlen == (STRLEN) -1 || retlen == 0) Perl_croak(aTHX_ "Malformed UTF-8 string in unpack"); s += retlen; @@ -2234,7 +2234,7 @@ S_unpack_rec(pTHX_ tempsym_t* symptr, const char *s, const char *strbeg, const c if (symptr->flags & FLAG_SLASH){ if (SP - PL_stack_base - start_sp_offset <= 0) - Perl_croak(aTHX_ "'/' must follow a numeric type in unpack"); + break; if( next_symbol(symptr) ){ if( symptr->howlen == e_number ) Perl_croak(aTHX_ "Count after length/code in unpack" ); @@ -3637,8 +3637,8 @@ PP(pp_pack) * Local variables: * c-indentation-style: bsd * c-basic-offset: 4 - * indent-tabs-mode: t + * indent-tabs-mode: nil * End: * - * ex: set ts=8 sts=4 sw=4 noet: + * ex: set ts=8 sts=4 sw=4 et: */