aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--iconv/gconv_simple.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index bc6ec3fb96..4557c9f2ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
* iconv/Makefile (tests): Add tst-iconv1.
* iconv/tst-iconv1.c: New file.
+ * iconv/gconv_simple.c (internal_ucs4_loop): Prefer reporting
+ empty input buffer over full output buffer.
Reported by yaoz@nih.gov.
2000-05-06 Bruno Haible <haible@clisp.cons.org>
diff --git a/iconv/gconv_simple.c b/iconv/gconv_simple.c
index 1844f2b838..caee6f36f9 100644
--- a/iconv/gconv_simple.c
+++ b/iconv/gconv_simple.c
@@ -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;