From 2a890281a1ded6f53a1a6cbaaceea24e1b8f43e0 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 10 Aug 2011 11:22:56 +0200 Subject: [PATCH] yaz_pqf_parse_facet_list returns FAIL (0) for bad facet spec --- src/pquery.c | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 1.7.10.4