diff --git a/Settings.c b/Settings.c index 0f31223fa2c972da7ee203846f93988b940b8dfc..6bbfe044f34c388d87c359cd6b7d46da5c355a66 100644 --- a/Settings.c +++ b/Settings.c @@ -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]; }