From 2d46a244382329ecf71c553e8e05bde1ccd5e667 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Sat, 13 Oct 2001 02:39:27 +0000 Subject: fix the test for "cp". 2001-10-12 Larry Ewing * gal/util/e-iconv.c (e_iconv_charset_name): fix the test for "cp". svn path=/trunk/; revision=13651 --- e-util/e-iconv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'e-util') diff --git a/e-util/e-iconv.c b/e-util/e-iconv.c index 99c6c888d5..c4f21960e1 100644 --- a/e-util/e-iconv.c +++ b/e-util/e-iconv.c @@ -262,6 +262,8 @@ const char *e_iconv_charset_name(const char *charset) if (ret != NULL) { UNLOCK(); return ret; + + } /* Unknown, try canonicalise some basic charset types to something that should work */ @@ -278,13 +280,13 @@ const char *e_iconv_charset_name(const char *charset) } else if (strncmp(name, "windows-", 8) == 0) { /* Convert windows-nnnnn or windows-cpnnnnn to cpnnnn */ tmp = name+8; - if (strncmp(tmp, "cp", 2)) + if (!strncmp(tmp, "cp", 2)) tmp+=2; ret = g_strdup_printf("CP%s", tmp); } else if (strncmp(name, "microsoft-", 10) == 0) { /* Convert microsoft-nnnnn or microsoft-cpnnnnn to cpnnnn */ tmp = name+10; - if (strncmp(tmp, "cp", 2)) + if (!strncmp(tmp, "cp", 2)) tmp+=2; ret = g_strdup_printf("CP%s", tmp); } else { -- cgit v1.2.3