diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2011-12-24 17:43:22 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2011-12-24 17:43:22 +0000 |
commit | 5a61c28fd404ea8390c9e4c035e0a35c782536d3 (patch) | |
tree | d2c97299d0b409136f7e0f287e15eba502222b44 /pcre_exec.c | |
parent | 8d2226da6db1b735e0639479d609810455444476 (diff) | |
download | pcre-5a61c28fd404ea8390c9e4c035e0a35c782536d3.tar.gz |
Tidy pcretest source code and some 8/16 messages. Add "16" error codes.
git-svn-id: svn://vcs.exim.org/pcre/code/branches/pcre16@823 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_exec.c')
-rw-r--r-- | pcre_exec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pcre_exec.c b/pcre_exec.c index c6bdaf6..fa8bc77 100644 --- a/pcre_exec.c +++ b/pcre_exec.c @@ -6078,8 +6078,13 @@ if (utf && (options & PCRE_NO_UTF8_CHECK) == 0) offsets[0] = erroroffset; offsets[1] = errorcode; } +#ifdef COMPILE_PCRE16 + return (errorcode <= PCRE_UTF16_ERR1 && md->partial > 1)? + PCRE_ERROR_SHORTUTF16 : PCRE_ERROR_BADUTF16; +#else return (errorcode <= PCRE_UTF8_ERR5 && md->partial > 1)? PCRE_ERROR_SHORTUTF8 : PCRE_ERROR_BADUTF8; +#endif } /* Check that a start_offset points to the start of a UTF character. */ |