[asterisk-commits] mmichelson: branch 1.6.0 r169795 - in /branches/1.6.0: ./ main/say.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jan 21 16:11:11 CST 2009
Author: mmichelson
Date: Wed Jan 21 16:11:11 2009
New Revision: 169795
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=169795
Log:
Merged revisions 169794 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r169794 | mmichelson | 2009-01-21 16:10:02 -0600 (Wed, 21 Jan 2009) | 17 lines
Fix a crash when saying certain numbers in Chinese
This commit fixes a crash that was occurring when attempting to
say a number between 10000 and 100000 due to dividing by 0.
This also removes some places where a "zero" is spoken when it
should not be.
(closes issue #14291)
Reported by: dant
Patches:
say.c-14291.diff uploaded by dant (license 670)
Tested by: dant
........
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/main/say.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/main/say.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.0/main/say.c?view=diff&rev=169795&r1=169794&r2=169795
==============================================================================
--- branches/1.6.0/main/say.c (original)
+++ branches/1.6.0/main/say.c Wed Jan 21 16:11:11 2009
@@ -2308,11 +2308,6 @@
num -= ((num / 100) * 100);
} else if (num < 10000){
snprintf(buf, 10, "%d", num);
- if (last_length - strlen(buf) > 1 && last_length != 0 && last_length % strlen(buf) > 0) {
- last_length = strlen(buf);
- playz++;
- continue;
- }
snprintf(fn, sizeof(fn), "digits/%d", (num / 1000));
playt++;
snprintf(buf, 10, "%d", num);
@@ -2323,9 +2318,6 @@
res = ast_say_number_full_tw(chan, num / 10000, ints, language, audiofd, ctrlfd);
if (res)
return res;
- if (((num / 10000) % (num/100000)) == 0)
- playz++;
-
snprintf(buf, 10, "%d", num);
ast_log(LOG_DEBUG, "Number '%d' %d %d\n", num, (int)strlen(buf), last_length);
num -= ((num / 10000) * 10000);
More information about the asterisk-commits
mailing list