Skip to content

Commit

Permalink
fix(xst: xtdb_load: font_fallback): add missing return statements on …
Browse files Browse the repository at this point in the history
…font loading error
  • Loading branch information
actionless committed Nov 7, 2024
1 parent fb26256 commit c64c178
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xst.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ xrdb_load(void)
fallback_fonts = realloc(fallback_fonts, (fonts_count + count + 2) * sizeof(char *));
if (!fallback_fonts) {
printf("ERROR: can't load fonts from 'st.font_fallback' !\n");
return;
}

for (int i = 0; i <= count; i++) {
Expand All @@ -89,6 +90,7 @@ xrdb_load(void)
fallback_fonts = realloc(fallback_fonts, (fonts_count + 2) * sizeof(char *));
if (!fallback_fonts) {
printf("ERROR: can't load fonts from 'st.font_fallback' !\n");
return;
}

fallback_fonts[fonts_count++] = ret.addr;
Expand Down

0 comments on commit c64c178

Please sign in to comment.