While we're at it, get rid of another sprintf.

This commit is contained in:
Hisham 2016-06-19 18:27:58 -03:00
parent b139671cbd
commit 52f814481c
1 changed files with 1 additions and 1 deletions

View File

@ -194,7 +194,7 @@ void Process_setupColumnWidths() {
assert(digits < 20);
for (int i = 0; Process_pidColumns[i].label; i++) {
assert(i < 20);
sprintf(Process_titleBuffer[i], "%*s ", digits, Process_pidColumns[i].label);
snprintf(Process_titleBuffer[i], digits + 2, "%*s ", digits, Process_pidColumns[i].label);
Process_fields[Process_pidColumns[i].id].title = Process_titleBuffer[i];
}
sprintf(Process_pidFormat, "%%%dd ", digits);