summaryrefslogtreecommitdiff
path: root/recipes/grip/grip-3.2.0/patch-src::discdb
blob: 1d300b270f0e84da4bbf0237f0cb78334ef2d789 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- src/discdb.c.orig	Thu Apr 15 21:23:37 2004
+++ src/discdb.c	Wed Mar 16 19:02:09 2005
@@ -311,7 +311,7 @@
     query->query_match=MATCH_EXACT;
     query->query_matches=0;
 
-    while((inbuffer=DiscDBReadLine(&dataptr))) {
+    while(query->query_matches < MAX_INEXACT_MATCHES && (inbuffer=DiscDBReadLine(&dataptr))) {
       query->query_list[query->query_matches].list_genre=
 	DiscDBGenreValue(g_strstrip(strtok(inbuffer," ")));
       
@@ -331,7 +331,7 @@
     query->query_match=MATCH_INEXACT;
     query->query_matches=0;
 
-    while((inbuffer=DiscDBReadLine(&dataptr))) {
+    while(query->query_matches < MAX_INEXACT_MATCHES && (inbuffer=DiscDBReadLine(&dataptr))) {
       query->query_list[query->query_matches].list_genre=
 	DiscDBGenreValue(g_strstrip(strtok(inbuffer," ")));