work again
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2249
35c25a1d-7b9e-4130-9fde-
d3aeb78583b8
if (c_mb_len <= 0) {
mbtowc(NULL, NULL, 0);
- wc = *c;
+ wc = (unsigned char)*c;
}
wcrep = control_wrep(wc);
*chr_mb_len = wctomb(chr_mb, chr);
if (*chr_mb_len <= 0) {
- mbtowc(NULL, NULL, 0);
- *chr_mb_len = 1;
- chr_mb[0] = (unsigned char)chr;
+ wctomb(NULL, 0);
+ *chr_mb_len = 0;
}
} else {
#endif
*chr_mb_len = 1;
- chr_mb[0] = (unsigned char)chr;
+ chr_mb[0] = (char)chr;
#ifdef NANO_WIDE
}
#endif
char *bad_buf_mb = charalloc(mb_cur_max());
int bad_buf_mb_len;
- bad_buf_mb = make_mbchar((unsigned int)*buf_mb,
+ bad_buf_mb = make_mbchar((unsigned char)*buf_mb,
bad_buf_mb, &bad_buf_mb_len);
for (i = 0; i < bad_buf_mb_len; i++)