diff options
author | cflip <cflip@cflip.net> | 2023-01-12 16:45:59 -0700 |
---|---|---|
committer | cflip <cflip@cflip.net> | 2023-01-12 16:45:59 -0700 |
commit | 24232e191a16015509b444fcee771b2f0cb1478b (patch) | |
tree | 18638ecf1abcd76f433542a8e016dbeb9bf2d383 | |
parent | 0d69f89e6bedb5ef675610d1025eaf8b46bd3422 (diff) |
Print an error message if loading the font file fails
-rw-r--r-- | font.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -46,6 +46,8 @@ PSFFont font_load(const char *filename) PSFFont font; FILE *fp = fopen(filename, "rb"); + if (!fp) + fatal_error("Failed to open font from '%s'\n", filename); fseek(fp, 0, SEEK_END); size_t filesize = ftell(fp); |