summaryrefslogtreecommitdiff
path: root/pcre16_ord2utf16.c
diff options
context:
space:
mode:
authorchpe <chpe@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-10-16 15:56:22 +0000
committerchpe <chpe@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-10-16 15:56:22 +0000
commitf4551b3ba82aff87a520b041b9e1dc1fe1ec5533 (patch)
treec03d7a438a26e93751fc67f2909a08038b7b20d0 /pcre16_ord2utf16.c
parent079e382d01f40c050c4ca2d6d43dddb097a5c08e (diff)
downloadpcre-f4551b3ba82aff87a520b041b9e1dc1fe1ec5533.tar.gz
pcre32: utf: Remove unused replacement in PRIV(ord2utf)
The code replaced surrogates and characters > 10ffff with fffe, for no apparent reason. Taking this code out still lets the test suite pass. We cannot assert however that the character is a valid unicode character since we do need to handle e.g. 10ffff here. git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1099 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre16_ord2utf16.c')
-rw-r--r--pcre16_ord2utf16.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/pcre16_ord2utf16.c b/pcre16_ord2utf16.c
index ed96827..7ae7277 100644
--- a/pcre16_ord2utf16.c
+++ b/pcre16_ord2utf16.c
@@ -69,11 +69,6 @@ PRIV(ord2utf)(pcre_uint32 cvalue, pcre_uchar *buffer)
{
#ifdef SUPPORT_UTF
-/* Checking invalid cvalue character, encoded as invalid UTF-16 character.
-Should never happen in practice. */
-if ((cvalue & 0xf800) == 0xd800 || cvalue >= 0x110000)
- cvalue = 0xfffe;
-
if (cvalue <= 0xffff)
{
*buffer = (pcre_uchar)cvalue;