From e615729ba0e58045756f03cb409d5adc54181750 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 7 Jun 2005 19:25:38 +0000 Subject: [PATCH] Fixed bug in yaz_marc_decode_buf. By mistake the routine appended MARC output rather than returning "new" buffer. --- NEWS | 5 +++++ src/marcdisp.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 0254205..b689dec 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,10 @@ Possible compatibility problems with earlier versions marked with '*'. +--- 2.1.8 2005/06/07 + +Fixed bug in yaz_marc_decode_buf. By mistake the routine appended +MARC output rather than returning "new" buffer. + --- 2.1.6 2005/05/24 Added support for SRW sort in Generic Frontend Server. Patch diff --git a/src/marcdisp.c b/src/marcdisp.c index 4e4230b..69f33d1 100644 --- a/src/marcdisp.c +++ b/src/marcdisp.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: marcdisp.c,v 1.21 2005-04-20 13:17:51 adam Exp $ + * $Id: marcdisp.c,v 1.22 2005-06-07 19:25:38 adam Exp $ */ /** @@ -561,7 +561,10 @@ int yaz_marc_decode_wrbuf (yaz_marc_t mt, const char *buf, int bsize, WRBUF wr) int yaz_marc_decode_buf (yaz_marc_t mt, const char *buf, int bsize, char **result, int *rsize) { - int r = yaz_marc_decode_wrbuf(mt, buf, bsize, mt->m_wr); + int r; + + wrbuf_rewind(mt->m_wr); + r = yaz_marc_decode_wrbuf(mt, buf, bsize, mt->m_wr); if (result) *result = wrbuf_buf(mt->m_wr); if (rsize) -- 1.7.10.4