]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
off by 1 err pointed out by trixter from irc
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 23 Nov 2007 18:09:44 +0000 (18:09 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 23 Nov 2007 18:09:44 +0000 (18:09 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@351 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/freetdm/src/libteletone_generate.c

index 6b262252bb7dbae0a02ad7e91e884051d3db46a9..fdf4dd14f7365ae7b76e2584e191509112d015ef 100644 (file)
@@ -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);