diff options
author | Sohaib Mohamed <sohaib.amhmd@gmail.com> | 2021-10-18 17:55:54 +1100 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2021-12-07 17:04:49 +1100 |
commit | cd6457ef88babcf5c0950e91b76d3b8ccf5d46bb (patch) | |
tree | 81c837049c217dd19973c93ad1ff6f938f827cb3 /Settings.c | |
parent | 31fe29c5a7e1e0b231012543065cacf13f52bf5b (diff) |
Fixup tabs with dynamic Columns - add missing `Dynamic()`
Diffstat (limited to 'Settings.c')
-rw-r--r-- | Settings.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -491,9 +491,12 @@ static bool Settings_read(Settings* this, const char* fileName, unsigned int ini static void writeFields(FILE* fd, const ProcessField* fields, Hashtable* columns, bool byName, char separator) { const char* sep = ""; for (unsigned int i = 0; fields[i]; i++) { - if (fields[i] >= LAST_PROCESSFIELD || byName) { + if (fields[i] < LAST_PROCESSFIELD && byName) { const char* pName = toFieldName(columns, fields[i]); fprintf(fd, "%s%s", sep, pName); + } else if(fields[i] >= LAST_PROCESSFIELD && byName) { + const char* pName = toFieldName(columns, fields[i]); + fprintf(fd, " Dynamic(%s)", pName); } else { // This "-1" is for compatibility with the older enum format. fprintf(fd, "%s%d", sep, (int) fields[i] - 1); |