diff options
author | Max Kellermann <max@duempel.org> | 2008-10-03 11:52:13 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-03 11:52:13 +0200 |
commit | f5b706fd865140da002f2e9f7af3b6f459aed115 (patch) | |
tree | c3534b9b23521b17fb2131b714904d14baa61a8d /src | |
parent | aef462cd9dfcf7573e7bc6e812f0c75ddde359f6 (diff) | |
download | mpd-f5b706fd865140da002f2e9f7af3b6f459aed115.tar.gz mpd-f5b706fd865140da002f2e9f7af3b6f459aed115.tar.xz mpd-f5b706fd865140da002f2e9f7af3b6f459aed115.zip |
charset: pass -1 instead of strlen()
The GTK charset functions accept "-1" if the parameter is null
terminated.
Diffstat (limited to 'src')
-rw-r--r-- | src/charset.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/charset.c b/src/charset.c index 095817d15..ccfac0ef8 100644 --- a/src/charset.c +++ b/src/charset.c @@ -71,7 +71,7 @@ utf8_to_locale(const char *utf8str) if (noconvert) return g_strdup(utf8str); - str = g_convert_with_fallback(utf8str, strlen(utf8str), + str = g_convert_with_fallback(utf8str, -1, charset, "utf-8", NULL, NULL, NULL, &error); @@ -98,7 +98,7 @@ locale_to_utf8(const char *localestr) if (noconvert) return g_strdup(localestr); - str = g_convert_with_fallback(localestr, strlen(localestr), + str = g_convert_with_fallback(localestr, -1, "utf-8", charset, NULL, NULL, NULL, &error); |