File reg_expr.diff of Package gthumb

--- libgthumb/search.c	2004-04-25 12:36:02.000000000 +0600
+++ libgthumb/search.c	2004-08-09 19:53:03.825369464 +0600
@@ -198,14 +198,18 @@
 
 		if (stripped == NULL)
 			continue;
-		
-		if (g_utf8_strchr (stripped, -1, '*') == NULL) {
-			char *temp = patterns[i];
-			patterns[i] = g_strconcat ("*", stripped, "*", NULL);
-			g_free (temp);
-		}
+	
+		char *temp;
+		if (stripped[0] != '*') 
+			temp = g_strconcat ("*", stripped, NULL);
+		else
+			temp = g_strdup (stripped);
+
+		if (stripped[ (g_utf8_strlen(stripped, -1) - 1) ] != '*') 
+		        temp = g_strconcat (temp, "*",  NULL);
 
 		g_free (stripped);
+		patterns[i] = temp;
 	}
 
 	return patterns;
openSUSE Build Service is sponsored by