yelp r3220 - in trunk: . src



Author: aklapper
Date: Wed Feb 25 18:18:18 2009
New Revision: 3220
URL: http://svn.gnome.org/viewvc/yelp?rev=3220&view=rev

Log:
2009-02-25  Andre Klapper  <a9016009 gmx de>

	* src/yelp-search-parser.c (search_clean_snippet):
	Fix crash. Patch by Antonio Litterio. Fixes bug #552947.



Modified:
   trunk/ChangeLog
   trunk/src/yelp-search-parser.c

Modified: trunk/src/yelp-search-parser.c
==============================================================================
--- trunk/src/yelp-search-parser.c	(original)
+++ trunk/src/yelp-search-parser.c	Wed Feb 25 18:18:18 2009
@@ -1232,10 +1232,14 @@
 
 	while ((str = strstr (result, (iteration[i])))) {
 	    gboolean breaking = FALSE;
-	    gint i;
-	    for (i=0; i< count; i++) {
+	    gint k;
+	    for (k=0; k< count; k++) {
+		if(iteration[k] == NULL){
+		    breaking = TRUE;
+		    break;
+		}
 		str++;
-		str = strstr (str, (iteration[i]));
+		str = strstr (str, (iteration[k]));
 		if (!str) {
 		    breaking = TRUE;
 		    break;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]