[Freeswitch-svn] [commit] r6388 - freeswitch/trunk/libs/libteletone/src

Freeswitch SVN anthm at freeswitch.org
Fri Nov 23 13:09:23 EST 2007


Author: anthm
Date: Fri Nov 23 13:09:23 2007
New Revision: 6388

Modified:
   freeswitch/trunk/libs/libteletone/src/libteletone_generate.c

Log:
off by 1 err pointed out by trixter from irc

Modified: freeswitch/trunk/libs/libteletone/src/libteletone_generate.c
==============================================================================
--- freeswitch/trunk/libs/libteletone/src/libteletone_generate.c	(original)
+++ freeswitch/trunk/libs/libteletone/src/libteletone_generate.c	Fri Nov 23 13:09:23 2007
@@ -106,7 +106,7 @@
 	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 @@
 	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);



More information about the Freeswitch-svn mailing list