Fix llvm build break.
authorRob Landley <rob@landley.net>
Tue, 21 Jul 2015 03:20:35 +0000 (22:20 -0500)
committerRob Landley <rob@landley.net>
Tue, 21 Jul 2015 03:20:35 +0000 (22:20 -0500)
toys/pending/ps.c

index cb0f32c..29111d5 100644 (file)
@@ -312,7 +312,7 @@ void ps_main(void)
           if (j!=2) break;
         }
         if (i == ARRAY_LEN(typos)) error_exit("bad -o %.*s", end-type, type);
-        if (!field->title) strcpy(field->title, typos[field->which]);
+        if (!*field->title) strcpy(field->title, typos[field->which]);
         dlist_add_nomalloc((void *)&TT.fields, (void *)field);
       }
     }