/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2011 Index Data
+ * Copyright (C) 1995-2012 Index Data
* See the file LICENSE for details.
*/
/**
}
while (**qptr && **qptr != sep_char)
{
- if (**qptr == '\\')
+ if (**qptr == '\\' && (*qptr)[1])
{
++(li->lex_len);
++(*qptr);
return attributes;
}
elements = (Z_AttributeElement**)
- odr_malloc (o, num_attr * sizeof(*elements));
+ odr_malloc(o, num_attr * sizeof(*elements));
attr_tmp = (Odr_int *)odr_malloc(o, num_attr * 2 * sizeof(*attr_tmp));
memcpy(attr_tmp, attr_list, num_attr * 2 * sizeof(*attr_tmp));
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