1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-01 04:14:16 -04:00

Pass NULL to settings_set_str to reset recode_fallback to its default

value rather than hardcoding the string, fixes also a possible invalid
g_free reported by Sven Wegener.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4829 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Emanuele Giaquinta 2008-05-17 09:42:23 +00:00 committed by exg
parent b8ac543f82
commit 4faa743972

View File

@ -160,7 +160,7 @@ static void read_settings(void)
if (!is_valid_charset(recode_fallback)) {
signal_emit("error command", 2, GINT_TO_POINTER(CMDERR_INVALID_CHARSET), recode_fallback);
g_free(recode_fallback);
recode_fallback = is_valid_charset(old_recode_fallback) ? g_strdup(old_recode_fallback) : "ISO8859-1";
recode_fallback = is_valid_charset(old_recode_fallback) ? g_strdup(old_recode_fallback) : NULL;
settings_set_str("recode_fallback", recode_fallback);
}