diff options
author | Bruno Haible <bruno@clisp.org> | 2003-05-12 09:44:33 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:10:28 +0200 |
commit | 5ae75d07d2e58eedc512fa45bcc9a166d9b03c11 (patch) | |
tree | 36a8a7c5475512e7f768773802e3ea411f85bc49 /gettext-tools | |
parent | a1bf7ce71847f951d289a2939aed65bef290b2de (diff) | |
download | external_gettext-5ae75d07d2e58eedc512fa45bcc9a166d9b03c11.zip external_gettext-5ae75d07d2e58eedc512fa45bcc9a166d9b03c11.tar.gz external_gettext-5ae75d07d2e58eedc512fa45bcc9a166d9b03c11.tar.bz2 |
Fix a bad bug with long strings.
Diffstat (limited to 'gettext-tools')
-rw-r--r-- | gettext-tools/lib/ChangeLog | 5 | ||||
-rw-r--r-- | gettext-tools/lib/linebreak.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog index 7251b21..58cf2ef 100644 --- a/gettext-tools/lib/ChangeLog +++ b/gettext-tools/lib/ChangeLog @@ -1,3 +1,8 @@ +2003-05-10 Bruno Haible <bruno@clisp.org> + + * linebreak.c (iconv_string_length): Don't return -1 just because the + string is longer than 4 KB. + 2003-05-09 Bruno Haible <bruno@clisp.org> * error.c: Update from gnulib with modifications. diff --git a/gettext-tools/lib/linebreak.c b/gettext-tools/lib/linebreak.c index ec1d23f..a541a77 100644 --- a/gettext-tools/lib/linebreak.c +++ b/gettext-tools/lib/linebreak.c @@ -1391,7 +1391,7 @@ iconv_string_length (iconv_t cd, const char *s, size_t n) char *outptr = tmpbuf; size_t outsize = TMPBUFSIZE; size_t res = iconv (cd, (ICONV_CONST char **) &inptr, &insize, &outptr, &outsize); - if (res == (size_t)(-1)) + if (res == (size_t)(-1) && errno != E2BIG) return (size_t)(-1); count += outptr - tmpbuf; } |