From 3253fc62b5a904fb53f94cea662156467e82803a Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Tue, 18 Nov 2008 22:36:06 +0000 Subject: Change previous logic -- we want to ignore U+FFFF regardless of the translit state. svn path=/trunk/iconv/; revision=5717 --- src/iconv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/iconv.c') diff --git a/src/iconv.c b/src/iconv.c index 800ece2..80d4caa 100644 --- a/src/iconv.c +++ b/src/iconv.c @@ -418,7 +418,7 @@ int character_callback(void *handle, UCS4 c) /* Stop on invalid characters if we're not transliterating */ /** \todo is this sane? -- we can't distinguish between illegal input * or valid input which just happens to correspond with U+fffd. */ - if ((c == 0xFFFD || c == 0xFFFF) && !e->transliterate) { + if ((c == 0xFFFD && !e->transliterate) || c == 0xFFFF) { e->write_state = WRITE_FAILED; return 1; } -- cgit v1.2.3