Allow utf8 in occupants char

This commit is contained in:
Michael Vetter
2021-10-22 16:47:15 +02:00
parent fa2881fcea
commit 1c96115f97
6 changed files with 25 additions and 29 deletions

View File

@@ -406,8 +406,8 @@ _load_preferences(void)
// with custom set functions
if (g_key_file_has_key(theme, "ui", "occupants.char", NULL)) {
gchar* ch = g_key_file_get_string(theme, "ui", "occupants.char", NULL);
if (ch && strlen(ch) > 0) {
prefs_set_occupants_char(ch[0]);
if (ch && g_utf8_strlen(ch, 4) == 1) {
prefs_set_occupants_char(ch);
g_free(ch);
}
}