mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05: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:
parent
b8ac543f82
commit
4faa743972
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user