Fix Security Attributes column header width

Limit the maximum width (instead of only the minimum width), pad the
header width accordingly, and also remove extra stray spaces from the
format string (the main spacing should just come from the alignment of
the value).

Fixes #850.
This commit is contained in:
Lucas Werkmeister 2021-10-20 00:36:27 +02:00 committed by cgzones
parent 30c5004cbb
commit 731b4003a2
1 changed files with 2 additions and 2 deletions

View File

@ -277,7 +277,7 @@ static void LinuxProcess_writeField(const Process* this, RichString* str, Proces
} }
xSnprintf(buffer, n, "%5lu ", lp->ctxt_diff); xSnprintf(buffer, n, "%5lu ", lp->ctxt_diff);
break; break;
case SECATTR: snprintf(buffer, n, "%-30s ", lp->secattr ? lp->secattr : "?"); break; case SECATTR: snprintf(buffer, n, "%-30.30s ", lp->secattr ? lp->secattr : "?"); break;
case AUTOGROUP_ID: case AUTOGROUP_ID:
if (lp->autogroup_id != -1) { if (lp->autogroup_id != -1) {
xSnprintf(buffer, n, "%4ld ", lp->autogroup_id); xSnprintf(buffer, n, "%4ld ", lp->autogroup_id);