--- abi/src/other/fribidi/xp/fribidi.c.orig	Sat Dec  1 06:20:36 2001
+++ abi/src/other/fribidi/xp/fribidi.c	Sun Jan 13 01:37:18 2002
@@ -193,11 +193,11 @@
 
   /* Sweep over the string_types */
   current.type = FRIBIDI_LEVEL_START;
   current.len = 0;
   current.pos = -1;
-  for (i = 0; i <= type_len; i++)
+  for (i = 0; i < type_len; i++)
     {
       if (char_type[i] != current.type || i == type_len)
 	{
 	  if (current.pos >= 0)
 	    {
@@ -1162,11 +1162,11 @@
     if (position_V_to_L_list)
       for (i = 0; i < len + 1; i++)
 	position_V_to_L_list[i] = i;
     /* Copy the logical string to the visual */
     if (visual_str)
-      for (i = 0; i < len + 1; i++)
+      for (i = 0; i < len; i++)
 	visual_str[i] = str[i];
 
     /* Assign the embedding level array */
     if (embedding_level_list)
       for (pp = type_rl_list->next; pp->next; pp = pp->next)
