mirror of
https://github.com/tat3r/tdfiglet.git
synced 2025-04-19 15:38:25 +00:00
Fix crash when font is missing a character
This commit is contained in:
parent
b0860ceca3
commit
abc048e3c4
@ -491,7 +491,13 @@ printstr(const char *str, font_t *font)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int c = 0; c < strlen(str); c++) {
|
for (int c = 0; c < strlen(str); c++) {
|
||||||
glyph_t *g = font->glyphs[lookupchar(str[c], font)];
|
int id = lookupchar(str[c], font);
|
||||||
|
|
||||||
|
if (id == -1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
glyph_t *g = font->glyphs[id];
|
||||||
printrow(g, i);
|
printrow(g, i);
|
||||||
|
|
||||||
if (opt.color == COLOR_ANSI) {
|
if (opt.color == COLOR_ANSI) {
|
||||||
|
Loading…
Reference in New Issue
Block a user