X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fodr_oct.c;h=fec7177dbda681b1acefedb5622c394239c1f7af;hp=c5cc8232b1c8ab9ac9f5988e486b90f77e74191c;hb=fe42f72dc30321041420cf2d1a83867b1c450f38;hpb=88d3bedf772316f87e1996f655ccf8d1e2589755 diff --git a/src/odr_oct.c b/src/odr_oct.c index c5cc823..fec7177 100644 --- a/src/odr_oct.c +++ b/src/odr_oct.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data + * Copyright (C) 1995-2012 Index Data * See the file LICENSE for details. */ /** @@ -141,9 +141,9 @@ int odr_iconv_string(ODR o, char **p, int opt, const char *name) size_t outleft = 4 * inleft + 2; char *outbuf = (char *) odr_malloc (o, outleft); size_t ret; - + t->buf = (unsigned char *) outbuf; - + ret = yaz_iconv(o->op->iconv_handle, &inbuf, &inleft, &outbuf, &outleft); if (ret == (size_t)(-1)) @@ -188,7 +188,7 @@ int odr_iconv_string(ODR o, char **p, int opt, const char *name) size_t ret; *p = outbuf; - + ret = yaz_iconv (o->op->iconv_handle, &inbuf, &inleft, &outbuf, &outleft); if (ret == (size_t)(-1)) @@ -204,7 +204,7 @@ int odr_iconv_string(ODR o, char **p, int opt, const char *name) return 0; } inleft = outbuf - (char*) *p; - + (*p)[inleft] = '\0'; /* null terminate it */ } if (!*p)