(main): Restore handling of transliterations, broken by last patch.
authordrepper <drepper>
Wed, 15 May 2002 05:41:25 +0000 (05:41 +0000)
committerdrepper <drepper>
Wed, 15 May 2002 05:41:25 +0000 (05:41 +0000)
iconvdata/tst-table-to.c

index 521ebad..1e873cd 100644 (file)
@@ -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)
              {