File remap-segfault.diff of Package wiggle

Index: wiggle-0.6/bestmatch.c
===================================================================
--- wiggle-0.6.orig/bestmatch.c
+++ wiggle-0.6/bestmatch.c
@@ -346,7 +346,7 @@ void remap(struct best *best, int cnt,
 	int pa,pb;
 	pa=pb=0;
 
-	for (b=1; b<cnt; b++) {
+	for (b=1; b<cnt; b++) if (best[b].val>0) {
 #if 0
 		printf("best %d,%d  %d,%d\n",
 		       best[b].xlo,best[b].ylo,
openSUSE Build Service is sponsored by