fix major breakage in iconv, bogus rejecting of dest charsets
authorRich Felker <dalias@aerifal.cx>
Sat, 21 Apr 2012 18:46:40 +0000 (14:46 -0400)
committerRich Felker <dalias@aerifal.cx>
Sat, 21 Apr 2012 18:46:40 +0000 (14:46 -0400)
src/locale/iconv.c

index a7d4fd9f5d345770cfc934996a046894d4615172..30a457f3f52be3f130572f976cea84526216508a 100644 (file)
@@ -94,7 +94,7 @@ iconv_t iconv_open(const char *to, const char *from)
 
        if ((t = find_charmap(to))==-1
         || (f = find_charmap(from))==-1
-        || (t >= 0320)) {
+        || (charmaps[t] >= 0320)) {
                errno = EINVAL;
                return (iconv_t)-1;
        }