/[pcre]/code/trunk/pcre_dfa_exec.c
ViewVC logotype

Diff of /code/trunk/pcre_dfa_exec.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 567 by ph10, Sat Nov 6 17:10:00 2010 UTC revision 569 by ph10, Sun Nov 7 16:14:50 2010 UTC
# Line 2963  back the character offset. */ Line 2963  back the character offset. */
2963  #ifdef SUPPORT_UTF8  #ifdef SUPPORT_UTF8
2964  if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0)  if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0)
2965    {    {
2966    if (_pcre_valid_utf8((uschar *)subject, length) >= 0)    int tb;
2967      return PCRE_ERROR_BADUTF8;    if ((tb = _pcre_valid_utf8((uschar *)subject, length)) >= 0)
2968        return (tb == length && (options & PCRE_PARTIAL_HARD) != 0)?
2969          PCRE_ERROR_SHORTUTF8 : PCRE_ERROR_BADUTF8;
2970    if (start_offset > 0 && start_offset < length)    if (start_offset > 0 && start_offset < length)
2971      {      {
2972      int tb = ((USPTR)subject)[start_offset] & 0xc0;      tb = ((USPTR)subject)[start_offset] & 0xc0;
2973      if (tb == 0x80) return PCRE_ERROR_BADUTF8_OFFSET;      if (tb == 0x80) return PCRE_ERROR_BADUTF8_OFFSET;
2974      }      }
2975    }    }

Legend:
Removed from v.567  
changed lines
  Added in v.569

  ViewVC Help
Powered by ViewVC 1.1.5