X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=retrieval%2Fd1_expout.c;h=18de3d3868422e4c867973663d15be9ecdd252bd;hp=8ced47f5389c70518e3af8cc08d2356e7e56f82a;hb=f69d4aa4609ff3daa71733da1ea0fcd8322ab954;hpb=5a43720eeca6175e7eba0672a9dc622c24125996 diff --git a/retrieval/d1_expout.c b/retrieval/d1_expout.c index 8ced47f..18de3d3 100644 --- a/retrieval/d1_expout.c +++ b/retrieval/d1_expout.c @@ -4,7 +4,13 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: d1_expout.c,v $ - * Revision 1.13 1998-06-05 08:58:48 adam + * Revision 1.15 1998-09-28 12:44:40 adam + * Fixed bug in f_integer. + * + * Revision 1.14 1998/06/08 14:26:41 adam + * Fixed bug in f_queryTypeDetails. + * + * Revision 1.13 1998/06/05 08:58:48 adam * Fixed un-initialised var in f_rpnCapabilities. * * Revision 1.12 1998/05/18 13:07:04 adam @@ -106,7 +112,7 @@ static int *f_integer(ExpHandle *eh, data1_node *c) if (!is_data_tag (eh, c) || c->u.data.len > 63) return 0; r = (int *)odr_malloc(eh->o, sizeof(*r)); - sprintf(intbuf, "%.*s", 63, c->u.data.data); + sprintf(intbuf, "%.*s", c->u.data.len, c->u.data.data); *r = atoi(intbuf); return r; } @@ -283,7 +289,7 @@ Z_RpnCapabilities *f_rpnCapabilities (ExpHandle *eh, data1_node *n) res->restrictionOperandSupported = eh->false_value; res->proximity = NULL; - for (c = n->child; n; c = c->next) + for (c = n->child; c; c = c->next) { int i = 0; switch (is_numeric_tag(eh, c)) @@ -330,7 +336,7 @@ Z_QueryTypeDetails *f_queryTypeDetails (ExpHandle *eh, data1_node *n) res->u.rpn = 0; for (c = n->child; c; c = c->next) { - switch (is_numeric_tag(eh, n)) + switch (is_numeric_tag(eh, c)) { case 519: res->which = Z_QueryTypeDetails_rpn;