diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2015-03-25 16:36:42 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-03-25 16:36:42 -0300 |
commit | 70abaadbaf9acfc9daff12728ea7a9e1092ff3f0 (patch) | |
tree | 608eeb0f25c2555beef90ea59da238fed2df3383 | |
parent | a93db5234c8e24c56c4b5b615de837afeeac5e74 (diff) |
Fix NULL-termination of array for later use by String_freeArray.
-rw-r--r-- | Settings.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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]; } |