(internal_ucs4_loop): Perfer reporting empty input buffer over full
authordrepper <drepper>
Sun, 7 May 2000 21:59:57 +0000 (21:59 +0000)
committerdrepper <drepper>
Sun, 7 May 2000 21:59:57 +0000 (21:59 +0000)
output buffer.

iconv/gconv_simple.c

index 1844f2b..caee6f3 100644 (file)
@@ -89,10 +89,10 @@ internal_ucs4_loop (const unsigned char **inptrp, const unsigned char *inend,
 #endif
 
   /* Determine the status.  */
-  if (*outptrp == outend)
-    result = __GCONV_FULL_OUTPUT;
-  else if (*inptrp == inend)
+  if (*inptrp == inend)
     result = __GCONV_EMPTY_INPUT;
+  else if (*outptrp == outend)
+    result = __GCONV_FULL_OUTPUT;
   else
     result = __GCONV_INCOMPLETE_INPUT;