/[pcre]/code/branches/pcre16/pcre_exec.c
ViewVC logotype

Diff of /code/branches/pcre16/pcre_exec.c

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

revision 793 by zherczeg, Wed Dec 7 14:36:26 2011 UTC revision 794 by zherczeg, Thu Dec 8 07:36:41 2011 UTC
# Line 6038  if (utf && (options & PCRE_NO_UTF8_CHECK Line 6038  if (utf && (options & PCRE_NO_UTF8_CHECK
6038      }      }
6039    
6040    /* Check that a start_offset points to the start of a UTF character. */    /* Check that a start_offset points to the start of a UTF character. */
 #ifdef COMPILE_PCRE8  
6041    if (start_offset > 0 && start_offset < length &&    if (start_offset > 0 && start_offset < length &&
6042        (((PCRE_PUCHAR)subject)[start_offset] & 0xc0) == 0x80)        NOT_FIRSTCHAR(((PCRE_PUCHAR)subject)[start_offset]))
6043      return PCRE_ERROR_BADUTF8_OFFSET;      return PCRE_ERROR_BADUTF8_OFFSET;
 #else  
 #ifdef COMPILE_PCRE16  
   if (start_offset > 0 && start_offset < length &&  
       (((PCRE_PUCHAR)subject)[start_offset] & 0xfc00) == 0xdc00)  
     return PCRE_ERROR_BADUTF8_OFFSET;  
 #endif /* COMPILE_PCRE16 */  
 #endif /* COMPILE_PCRE8 */  
6044    }    }
6045  #endif  #endif
6046    

Legend:
Removed from v.793  
changed lines
  Added in v.794

  ViewVC Help
Powered by ViewVC 1.1.5