]> git.refcnt.org Git - colorize.git/blobdiff - colorize.c
Makefile: declare readme target as phony
[colorize.git] / colorize.c
index b1d9ecc18d52c510f916f0620158386dce4dd8ea..9a6a6f9d69ac26e2ef023a007038ddfba6026ebe 100644 (file)
@@ -383,8 +383,12 @@ main (int argc, char **argv)
 
 #if DEBUG
     log = open_file (DEBUG_FILE, "w");
-    STACK_FILE (log);
     print_tstamp (log);
+    /* We're in debugging mode, hence we can't invoke STACK_FILE()
+       prior to print_tstamp(), because both cause text to be written
+       to the same logfile which is expected to have the timestamp
+       first.  */
+    STACK_FILE (log);
 #endif
 
     attr[0] = '\0';
@@ -1927,7 +1931,8 @@ release (struct var_list *list, unsigned int stacked, void **ptr)
     for (i = 0; i < stacked; i++)
       {
         struct var_list *var = &list[i];
-        if (var->ptr == *ptr)
+        if (var->type != IS_UNUSED
+         && var->ptr == *ptr)
           {
             switch (var->type)
               {