]> git.refcnt.org Git - colorize.git/commitdiff
Assert after find_color_entry() returns
authorSteven Schubiger <stsc@refcnt.org>
Sat, 7 Oct 2017 19:46:40 +0000 (21:46 +0200)
committerSteven Schubiger <stsc@refcnt.org>
Sat, 7 Oct 2017 19:46:40 +0000 (21:46 +0200)
colorize.c

index cefde455c1e7c62f932067504bb6933eb6234b2e..ff346b0c25e35bacd3707f1d8b784b57e004d0fb 100644 (file)
@@ -704,6 +704,7 @@ process_args (unsigned int arg_cnt, char **arg_strings, char *attr, const struct
         color_name.name = color_name.orig = "default";
 
         find_color_entry (&color_name, FOREGROUND, colors);
+        assert (colors[FOREGROUND]->code != NULL);
       }
 
     process_file_arg (file_string, file, stream);