summaryrefslogtreecommitdiff
path: root/pp_pack.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-10-12 15:28:29 +0100
committerNicholas Clark <nick@ccl4.org>2009-10-12 15:28:29 +0100
commit64332b6b34a2fb241657f12a8a3fe19b7a4d24dd (patch)
tree7df8efc2138bff4c1293529dadb6135f42745536 /pp_pack.c
parentdf71d98f99064b8112949a5b051443ab812b2911 (diff)
downloadperl-64332b6b34a2fb241657f12a8a3fe19b7a4d24dd.tar.gz
In uni_to_bytes(), fix ckWARN() anomaly.
Diffstat (limited to 'pp_pack.c')
-rw-r--r--pp_pack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp_pack.c b/pp_pack.c
index 72a96666cf..5933fd596b 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",