aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-12-15 17:55:27 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-12-15 17:55:27 +0000
commit0d6b5f522ed755aca8a85c005962fb03232b4c96 (patch)
treeac866711302bb71827f5f5b1c8ab439b8a4c0ecc /main.c
parentcsi: SGR 21 is “double underline”, not “disable bold” (according to ECMA-48) (diff)
config_font_parse(): return fail/success
Diffstat (limited to 'main.c')
-rw-r--r--main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/main.c b/main.c
index 59ac9b61..094c242a 100644
--- a/main.c
+++ b/main.c
@@ -403,8 +403,13 @@ main(int argc, char *const *argv)
config_font_destroy(&it->item);
tll_free(conf.fonts[i]);
}
- tll_foreach(conf_fonts, it)
- tll_push_back(conf.fonts[0], config_font_parse(it->item));
+ tll_foreach(conf_fonts, it) {
+ struct config_font font;
+ if (!config_font_parse(it->item, &font)) {
+ LOG_ERR("%s: invalid font specification", it->item);
+ } else
+ tll_push_back(conf.fonts[0], font);
+ }
tll_free(conf_fonts);
}
if (conf_width > 0 && conf_height > 0) {