aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-06-18 13:56:34 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-06-18 13:56:34 +0000
commit078f790b721fc9f998f333081396d57dbc2adee9 (patch)
tree1e41623b0ade301fdeafdf667b669067cdc972ee
parentMerge branch 'title-update' (diff)
term: fix regression after merging #599
Don’t increment ‘j’ twice in each loop iteration, and fix typo in loop condition (check ‘j’, not ‘i’).
-rw-r--r--terminal.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/terminal.c b/terminal.c
index 1e1a7f78..b916868b 100644
--- a/terminal.c
+++ b/terminal.c
@@ -970,9 +970,9 @@ load_fonts_from_conf(struct terminal *term)
for (size_t i = 0; i < 4; i++) {
const struct config_font_list *font_list = &conf->fonts[i];
- for (size_t j = 0; i < font_list->count; j++) {
+ for (size_t j = 0; j < font_list->count; j++) {
const struct config_font *font = &font_list->arr[j];
- term->font_sizes[i][j++] = (struct config_font){
+ term->font_sizes[i][j] = (struct config_font){
.pt_size = font->pt_size, .px_size = font->px_size};
}
}
@@ -1183,7 +1183,7 @@ term_init(const struct config *conf, struct fdm *fdm, struct reaper *reaper,
const struct config_font_list *font_list = &conf->fonts[i];
for (size_t j = 0; j < font_list->count; j++) {
const struct config_font *font = &font_list->arr[j];
- term->font_sizes[i][j++] = (struct config_font){
+ term->font_sizes[i][j] = (struct config_font){
.pt_size = font->pt_size, .px_size = font->px_size};
}
}