diff options
Diffstat (limited to 'iconvdata/tst-table-to.c')
-rw-r--r-- | iconvdata/tst-table-to.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/iconvdata/tst-table-to.c b/iconvdata/tst-table-to.c index 521ebad..1e873cd 100644 --- a/iconvdata/tst-table-to.c +++ b/iconvdata/tst-table-to.c @@ -77,15 +77,16 @@ main (int argc, char *argv[]) char *outbuf = (char *) buf; size_t outbytesleft = sizeof (buf); size_t result; + size_t result2 = 0; iconv (cd, NULL, NULL, NULL, NULL); result = iconv (cd, (char **) &inbuf, &inbytesleft, &outbuf, &outbytesleft); if (result != (size_t)(-1)) - result = iconv (cd, NULL, NULL, &outbuf, &outbytesleft); + result2 = iconv (cd, NULL, NULL, &outbuf, &outbytesleft); - if (result == (size_t)(-1)) + if (result == (size_t)(-1) || result2 == (size_t)(-1)) { if (errno != EILSEQ) { |