File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -611,15 +611,15 @@ static void re_compile_fastmap_aux(code,
611611 {
612612 syntaxcode = code [pos ++ ];
613613 for (a = 0 ; a < 256 ; a ++ )
614- if (SYNTAX (a ) == syntaxcode )
614+ if (SYNTAX (a ) & syntaxcode )
615615 fastmap [a ] = 1 ;
616616 return ;
617617 }
618618 case Cnotsyntaxspec :
619619 {
620620 syntaxcode = code [pos ++ ];
621621 for (a = 0 ; a < 256 ; a ++ )
622- if (SYNTAX (a ) != syntaxcode )
622+ if (!( SYNTAX (a ) & syntaxcode ) )
623623 fastmap [a ] = 1 ;
624624 return ;
625625 }
@@ -1866,12 +1866,12 @@ int re_match(bufp,
18661866 if (translate )
18671867 {
18681868 while (text < textend &&
1869- translate [ SYNTAX (* text )] == a )
1869+ ( SYNTAX (translate [ * text ]) & a ) )
18701870 text ++ ;
18711871 }
18721872 else
18731873 {
1874- while (text < textend && SYNTAX (* text ) == a )
1874+ while (text < textend && ( SYNTAX (* text ) & a ) )
18751875 text ++ ;
18761876 }
18771877 break ;
@@ -1882,12 +1882,12 @@ int re_match(bufp,
18821882 if (translate )
18831883 {
18841884 while (text < textend &&
1885- translate [ SYNTAX (* text )] != a )
1885+ !( SYNTAX (translate [ * text ]) & a ) )
18861886 text ++ ;
18871887 }
18881888 else
18891889 {
1890- while (text < textend && SYNTAX (* text ) != a )
1890+ while (text < textend && !( SYNTAX (* text ) & a ) )
18911891 text ++ ;
18921892 }
18931893 break ;
You can’t perform that action at this time.
0 commit comments