X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fsiconv.c;h=d3e078fe6bca4eabbcf59286e259292838a8a3d6;hb=1069eaf4dbf89cdb270d26373f644e00e343d9ac;hp=c0c70bfe2461df7039ebff41ea1b04acd281d52a;hpb=8626b7019b5d3d9c9594f20025e97d06a2d590fc;p=yaz-moved-to-github.git diff --git a/src/siconv.c b/src/siconv.c index c0c70bf..d3e078f 100644 --- a/src/siconv.c +++ b/src/siconv.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: siconv.c,v 1.19 2006-04-19 23:15:39 adam Exp $ + * $Id: siconv.c,v 1.21 2006-04-19 23:48:06 adam Exp $ */ /** * \file siconv.c @@ -722,13 +722,13 @@ static size_t flush_combos(yaz_iconv_t cd, if (!y) return 0; - byte = (y>>16) & 0xff; + byte = (unsigned char )((y>>16) & 0xff); if (byte) out_buf[out_no++] = byte; - byte = (y>>8) & 0xff; + byte = (unsigned char)((y>>8) & 0xff); if (byte) out_buf[out_no++] = byte; - byte = y & 0xff; + byte = (unsigned char )(y & 0xff); if (byte) out_buf[out_no++] = byte; @@ -740,7 +740,8 @@ static size_t flush_combos(yaz_iconv_t cd, for (i = 0; i < cd->write_marc8_comb_no; i++) { - byte = cd->write_marc8_comb_ch[i]; + /* all MARC-8 combined characters are simple bytes */ + byte = (unsigned char )(cd->write_marc8_comb_ch[i]); if (byte == 0xEB) second_half = 0xEC; else if (byte == 0xFA)