]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Arrays are 0 indexed in C, duh
authorAndrew Thompson <andrew@hijacked.us>
Sun, 17 Oct 2010 20:19:38 +0000 (16:19 -0400)
committerAndrew Thompson <andrew@hijacked.us>
Sun, 17 Oct 2010 20:19:38 +0000 (16:19 -0400)
src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c

index f2a20f34c9cdee95bcb9a63a3ac6ce991a9160cc..8565e1afa77985e20e4003e02006198d58d563b0 100644 (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'))) {