From: Sven Verdoolaege Date: Wed, 30 Dec 2009 07:36:11 +0000 (+0100) Subject: common/conv.c: fix segmentation fault during conversion on 64bit machines X-Git-Url: https://repo.or.cz/w/nvi.git/commitdiff_plain/5cea8aab3d05e48942ea2bf7a9ae81a1216083b4 common/conv.c: fix segmentation fault during conversion on 64bit machines The second argument of iconv is of type size_t * and not of type int *. --- diff --git a/common/conv.c b/common/conv.c index 02dfd32b..9884a634 100644 --- a/common/conv.c +++ b/common/conv.c @@ -89,7 +89,7 @@ int default_char2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, size_t *tolen, CHAR_T **dst, char *enc) { - int i = 0, j; + size_t i = 0, j; CHAR_T **tostr = (CHAR_T **)&cw->bp1; size_t *blen = &cw->blen1; mbstate_t mbs; @@ -210,7 +210,7 @@ int default_int2char(SCR *sp, const CHAR_T * str, ssize_t len, CONVWIN *cw, size_t *tolen, char **pdst, char *enc) { - int i, j, offset = 0; + size_t i, j, offset = 0; char **tostr = (char **)&cw->bp1; size_t *blen = &cw->blen1; mbstate_t mbs;