mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-18 05:34:02 -04:00
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’).
This commit is contained in:
parent
fa06cf31ff
commit
078f790b72
1 changed files with 3 additions and 3 deletions
|
|
@ -970,9 +970,9 @@ load_fonts_from_conf(struct terminal *term)
|
||||||
for (size_t i = 0; i < 4; i++) {
|
for (size_t i = 0; i < 4; i++) {
|
||||||
const struct config_font_list *font_list = &conf->fonts[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];
|
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};
|
.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];
|
const struct config_font_list *font_list = &conf->fonts[i];
|
||||||
for (size_t j = 0; j < font_list->count; j++) {
|
for (size_t j = 0; j < font_list->count; j++) {
|
||||||
const struct config_font *font = &font_list->arr[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};
|
.pt_size = font->pt_size, .px_size = font->px_size};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue