From cd6457ef88babcf5c0950e91b76d3b8ccf5d46bb Mon Sep 17 00:00:00 2001 From: Sohaib Mohamed Date: Mon, 18 Oct 2021 17:55:54 +1100 Subject: Fixup tabs with dynamic Columns - add missing `Dynamic()` --- Settings.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Settings.c') diff --git a/Settings.c b/Settings.c index dff39b57..a62ecb57 100644 --- a/Settings.c +++ b/Settings.c @@ -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); -- cgit v1.2.3