Bump copyright year
[yaz-moved-to-github.git] / src / cqltransform.c
index ea6c20a..7173f01 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data
+ * Copyright (C) 1995-2010 Index Data
  * See the file LICENSE for details.
  */
 
@@ -107,7 +107,7 @@ static int cql_transform_parse_tok_line(cql_transform_t ct,
             t = yaz_tok_move(tp);
         }
         elem->attributeType = nmem_intdup(ct->nmem, 0);
-        if (sscanf(wrbuf_cstr(type_str), "%d", elem->attributeType)
+        if (sscanf(wrbuf_cstr(type_str), ODR_INT_PRINTF, elem->attributeType)
             != 1)
         {
             wrbuf_destroy(type_str);
@@ -350,7 +350,7 @@ const char *cql_lookup_reverse(cql_transform_t ct,
                     
             }
             if (i == e->attr_list.num_attributes)
-                return e->pattern;
+                return e->pattern + clen;
         }
     }
     return 0;