Sophie

Sophie

distrib > Mandriva > mes5 > x86_64 > by-pkgid > 38d6e3092423b96887e5f34894ad789c > files > 11

grep-2.5.4-1mdvmes5.src.rpm

--- src/dfa.c
+++ src/dfa.c
@@ -1287,7 +1287,14 @@
   int i;
 
   for (i = 0; i < ntokens; ++i)
-    addtok(dfa->tokens[tindex + i]);
+    {
+      addtok(dfa->tokens[tindex + i]);
+#ifdef MBS_SUPPORT
+      /* Update index into multibyte csets.  */
+      if (MB_CUR_MAX > 1 && dfa->tokens[tindex + i] == MBCSET)
+	dfa->multibyte_prop[dfa->tindex - 1] = dfa->multibyte_prop[tindex + i];
+#endif
+    }
 }
 
 static void