Fix NULL-termination of array for later use by String_freeArray.

This commit is contained in:
Hisham Muhammad 2015-03-25 16:36:42 -03:00
parent a93db5234c
commit 70abaadbaf
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ static void Settings_defaultMeters(Settings* this, int cpuCount) {
sizes[1]++;
}
for (int i = 0; i < 2; i++) {
this->columns[i].names = calloc(sizes[i], sizeof(char*));
this->columns[i].names = calloc(sizes[i] + 1, sizeof(char*));
this->columns[i].modes = calloc(sizes[i], sizeof(int));
this->columns[i].len = sizes[i];
}