BUG: Resize initially

This commit is contained in:
Alex D. 2020-12-22 17:39:17 +00:00
parent 3849e65431
commit 619ecee0f3
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
1 changed files with 1 additions and 0 deletions

View File

@ -45,6 +45,7 @@ parse_configfile(char* config_path, Connection* conn)
config_setting_t* chans;
if ((chans = config_lookup(&conf, ".channels")) != NULL) {
// TODO: Check if config_setting_length can return negative values
resize_chanarray(&conn->info.channels);
for (unsigned int i = 0; i < (unsigned int) config_setting_length(chans); i++) {
config_setting_t* chanelem = config_setting_get_elem(chans, i);
const char * name = NULL, *key = NULL;