From: Anthony Minessale Date: Fri, 23 Nov 2007 18:09:23 +0000 (+0000) Subject: off by 1 err pointed out by trixter from irc X-Git-Tag: v1.0-rc1~1428 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=620508cc805b80e396050bb8f645ca8433c2ebe8;p=thirdparty%2Ffreeswitch.git off by 1 err pointed out by trixter from irc git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6388 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/libs/libteletone/src/libteletone_generate.c b/libs/libteletone/src/libteletone_generate.c index 6b262252bb..fdf4dd14f7 100644 --- a/libs/libteletone/src/libteletone_generate.c +++ b/libs/libteletone/src/libteletone_generate.c @@ -106,7 +106,7 @@ int teletone_set_tone(teletone_generation_session_t *ts, int index, ...) teletone_process_t x = 0; va_start(ap, index); - while (i <= TELETONE_MAX_TONES && (x = va_arg(ap, teletone_process_t))) { + while (i < TELETONE_MAX_TONES && (x = va_arg(ap, teletone_process_t))) { ts->TONES[index].freqs[i++] = x; } va_end(ap); @@ -122,7 +122,7 @@ int teletone_set_map(teletone_tone_map_t *map, ...) teletone_process_t x = 0; va_start(ap, map); - while (i <= TELETONE_MAX_TONES && (x = va_arg(ap, teletone_process_t))) { + while (i < TELETONE_MAX_TONES && (x = va_arg(ap, teletone_process_t))) { map->freqs[i++] = x; } va_end(ap);