]> git.refcnt.org Git - colorize.git/blobdiff - colorize.c
Assert after find_color_entry() returns
[colorize.git] / colorize.c
index 218713d92020c159d226fd61402a2465cf6ad5fe..ff346b0c25e35bacd3707f1d8b784b57e004d0fb 100644 (file)
 # define COLOR_SEP_CHAR '/'
 #endif
 
-#define DEBUG_FILE "debug.txt"
+#if DEBUG
+# define DEBUG_FILE "debug.txt"
+#endif
 
 #define MAX_ATTRIBUTE_CHARS (6 * 2)
 
@@ -702,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);