diff options
Diffstat (limited to 'iconvdata/8bit-gap.c')
-rw-r--r-- | iconvdata/8bit-gap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/iconvdata/8bit-gap.c b/iconvdata/8bit-gap.c index 6c78ce5c24..a8d3c99a68 100644 --- a/iconvdata/8bit-gap.c +++ b/iconvdata/8bit-gap.c @@ -110,7 +110,7 @@ gconv (struct gconv_step *step, struct gconv_step_data *data, while (cnt < inchars && (outwchars + sizeof (wchar_t) <= data->outbufsize)) { - wchar_t ch = to_ucs4[(unsigned int) inbuf[cnt]]; + wchar_t ch = to_ucs4[((unsigned char *) inbuf)[cnt]]; if (ch == L'\0' && inbuf[cnt] != '\0') { @@ -125,6 +125,7 @@ gconv (struct gconv_step *step, struct gconv_step_data *data, ++cnt; } *inbufsize -= cnt; + inbuf += cnt; data->outbufavail = outwchars; } else @@ -158,6 +159,7 @@ gconv (struct gconv_step *step, struct gconv_step_data *data, cnt += sizeof (wchar_t); } *inbufsize -= cnt; + inbuf += cnt; data->outbufavail = outchars; if (outchars < data->outbufsize) |