diff options
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c index 9b0fe91..a0e77b2 100644 --- a/src/config.c +++ b/src/config.c @@ -399,7 +399,14 @@ uint32_t parse_anchor(const char *filename, size_t lineno, const char *str, bool struct color parse_color(const char *filename, size_t lineno, const char *str, bool *err) { - return hex_to_color(str); + struct color color = hex_to_color(str); + if (color.r == -1) { + PARSE_ERROR(filename, lineno, "Failed to parse \"%s\" as a color.\n", str); + if (err) { + *err = true; + } + } + return color; } uint32_t parse_uint32(const char *filename, size_t lineno, const char *str, bool *err) |