From 075a120c1eab961dba30ccf41abb936206bd5d83 Mon Sep 17 00:00:00 2001 From: Sebastian Hammer Date: Wed, 18 Apr 2007 12:41:38 +0000 Subject: [PATCH] I think this addresses Bug 1070. --- src/database.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/database.c b/src/database.c index 67e7ea2..70e556a 100644 --- a/src/database.c +++ b/src/database.c @@ -1,4 +1,4 @@ -/* $Id: database.c,v 1.18 2007-04-13 00:29:14 quinn Exp $ +/* $Id: database.c,v 1.19 2007-04-18 12:41:38 quinn Exp $ Copyright (c) 2006-2007, Index Data. This file is part of Pazpar2. @@ -227,19 +227,18 @@ static int match_criterion(struct setting **settings, struct database_criterion if (offset == PZ_ID) { if (match_zurl(settings[offset]->value, v->value)) - return 1; - else - return 0; + break; } else { if (!strcmp(settings[offset]->value, v->value)) - return 1; - else - return 0; + break; } } - return 0; + if (v) + return 1; + else + return 0; } int database_match_criteria(struct setting **settings, struct database_criterion *cl) -- 1.7.10.4