summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-11-11 12:12:52 -0700
committerKarl Williamson <khw@cpan.org>2015-11-25 15:48:17 -0700
commit80670d3798d4141aa685fdabe96e2aadc61913de (patch)
tree44bf04fc28d3553a2a53ff5189e1f0f061c77eb6 /utf8.c
parent7dfd844657592a17d8df0838751abd0be2c7591b (diff)
downloadperl-80670d3798d4141aa685fdabe96e2aadc61913de.tar.gz
Fix uvoffuni_to_utf8_flags() disallowed input
This function has the capability to refuse to accept problematic code points, such as surrogates. It accepted them anyway if the warnings category wasn't enabled. Tests for this will be introduced in the next commit.
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/utf8.c b/utf8.c
index 86e793b24b..1ae0e9e8a6 100644
--- a/utf8.c
+++ b/utf8.c
@@ -116,8 +116,7 @@ Perl_uvoffuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags)
/* The first problematic code point is the first surrogate */
if ( flags /* It's common to turn off all these */
- && uv >= UNICODE_SURROGATE_FIRST
- && ckWARN3_d(WARN_SURROGATE, WARN_NON_UNICODE, WARN_NONCHAR))
+ && uv >= UNICODE_SURROGATE_FIRST)
{
if (UNICODE_IS_SURROGATE(uv)) {
if (flags & UNICODE_WARN_SURROGATE) {