From: Adam Dickmeiss Date: Wed, 10 Aug 2011 09:22:56 +0000 (+0200) Subject: yaz_pqf_parse_facet_list returns FAIL (0) for bad facet spec X-Git-Tag: v4.2.8~12 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=2a890281a1ded6f53a1a6cbaaceea24e1b8f43e0;p=yaz-moved-to-github.git yaz_pqf_parse_facet_list returns FAIL (0) for bad facet spec --- diff --git a/src/pquery.c b/src/pquery.c index a023d96..a0fde12 100644 --- a/src/pquery.c +++ b/src/pquery.c @@ -888,7 +888,11 @@ Z_FacetList *yaz_pqf_parse_facet_list(ODR o, const char *qbuf) fl->elements = (Z_FacetField **) odr_malloc(o, num * sizeof(*fl->elements)); for (i = 0; i < num; i++) + { fl->elements[i] = parse_facet(o, darray[i]); + if (!fl->elements[i]) + return 0; + } return fl; } else