]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - iconv/loop.c
2.5-18.1
[thirdparty/glibc.git] / iconv / loop.c
index 1918fe5007e4b1fe64105669834cad479bcdf3cd..9785bf865ca4b436d5a883ec819a54cebcc1b764 100644 (file)
@@ -1,5 +1,5 @@
 /* Conversion loop frame work.
-   Copyright (C) 1998-2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1998-2002, 2003, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -450,6 +450,10 @@ SINGLE(LOOPFCT) (struct __gconv_step *step,
 #else
       /* We don't have enough input for another complete input
         character.  */
+      assert (inend - inptr > (state->__count & ~7));
+      assert (inend - inptr <= 7);
+      state->__count = (state->__count & ~7) | (inend - inptr);
+      inlen = 0;
       while (inptr < inend)
        state->__value.__wchb[inlen++] = *inptr++;
 #endif