From: Nicholas Clark Date: Mon, 12 Oct 2009 14:28:29 +0000 (+0100) Subject: In uni_to_bytes(), fix ckWARN() anomaly. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=64332b6b34a2fb241657f12a8a3fe19b7a4d24dd;p=p5sagit%2Fp5-mst-13.2.git In uni_to_bytes(), fix ckWARN() anomaly. --- diff --git a/pp_pack.c b/pp_pack.c index 72a9666..5933fd5 100644 --- a/pp_pack.c +++ b/pp_pack.c @@ -678,7 +678,8 @@ uni_to_bytes(pTHX_ const char **s, const char *end, const char *buf, int buf_len } if (from > end) from = end; } - if ((bad & 2) && ckWARN(WARN_UNPACK)) + if ((bad & 2) && ((datumtype & TYPE_IS_PACK) + ? ckWARN(WARN_PACK) : ckWARN(WARN_UNPACK))) Perl_warner(aTHX_ packWARN(datumtype & TYPE_IS_PACK ? WARN_PACK : WARN_UNPACK), "Character(s) in '%c' format wrapped in %s",