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

Diff of /code/trunk/pcre32_ord2utf32.c

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

revision 1055 by chpe, Tue Oct 16 15:53:30 2012 UTC revision 1083 by chpe, Tue Oct 16 15:55:24 2012 UTC
# Line 50  character value into a UTF32 string. */ Line 50  character value into a UTF32 string. */
50    
51  #include "pcre_internal.h"  #include "pcre_internal.h"
52    
 #define MASK (0x1fffffu)  
   
53  /*************************************************  /*************************************************
54  *       Convert character value to UTF-32         *  *       Convert character value to UTF-32         *
55  *************************************************/  *************************************************/
# Line 71  PRIV(ord2utf)(pcre_uint32 cvalue, pcre_u Line 69  PRIV(ord2utf)(pcre_uint32 cvalue, pcre_u
69  {  {
70  #ifdef SUPPORT_UTF  #ifdef SUPPORT_UTF
71    
72  cvalue &= MASK;  cvalue &= UTF32_MASK;
73    
74  /* Checking invalid cvalue character, encoded as invalid UTF-32 character */  /* Checking invalid cvalue character, encoded as invalid UTF-32 character */
75  if ((cvalue & 0xfffff800u) == 0xd800u || cvalue >= 0x110000u)  if ((cvalue & 0xfffff800u) == 0xd800u || cvalue >= 0x110000u)

Legend:
Removed from v.1055  
changed lines
  Added in v.1083

  ViewVC Help
Powered by ViewVC 1.1.5