Arrays are 0 indexed in C, duh

This commit is contained in:
Andrew Thompson 2010-10-17 16:19:38 -04:00
parent 4680cbb2dd
commit dc40a7789c
1 changed files with 1 additions and 1 deletions

View File

@ -1041,7 +1041,7 @@ static int read_cookie_from_file(char *filename) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to read cookie file %s : %d.\n", filename, errno);
}
cookie[MAXATOMLEN+1] = '\0';
cookie[MAXATOMLEN] = '\0';
/* replace any end of line characters with a null */
if ((end = strchr(cookie, '\n'))) {