summaryrefslogtreecommitdiff
path: root/main/say.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2014-03-26 22:45:10 +0000
committerJoshua Colp <jcolp@digium.com>2014-03-26 22:45:10 +0000
commit7dddd694cb0a9c6024cda5099cb8f410eb07ba97 (patch)
tree7e713f796f4b5ffb467b7305f9ffb61d6c302089 /main/say.c
parentfa3a2f8ecaeb5ba65ff2ff99097aa4381fbc1379 (diff)
say: Fix a bug where SayNumber in Polish tries to play incorrect sound.
This change fixes a bug where calling SayNumber with a number divisible by 100 using the Polish language would cause the code to attempt to play a sound file with an empty name. (closes issue ASTERISK-23509) Reported by: zvision Review: https://reviewboard.asterisk.org/r/3378/ ........ Merged revisions 411243 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 411244 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 411245 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/say.c')
-rw-r--r--main/say.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/main/say.c b/main/say.c
index f8dcd4ea6..bda1da3c3 100644
--- a/main/say.c
+++ b/main/say.c
@@ -1932,17 +1932,17 @@ static void powiedz(struct ast_channel *chan, const char *language, int audiofd,
if (i100>0)
pl_odtworz_plik(chan, language, audiofd, ctrlfd, ints, odm->setki[i100]);
- if ( m100 > 0 && m100 <=9 ) {
- if (m1000>0)
+ if (m100 > 0 && m100 <= 9) {
+ if (m1000 > 0)
pl_odtworz_plik(chan, language, audiofd, ctrlfd, ints, odm->cyfry2[m100]);
else
pl_odtworz_plik(chan, language, audiofd, ctrlfd, ints, odm->cyfry[m100]);
- } else if (m100 % 10 == 0) {
+ } else if (m100 % 10 == 0 && m100 != 0) {
pl_odtworz_plik(chan, language, audiofd, ctrlfd, ints, odm->dziesiatki[m100 / 10]);
- } else if (m100 <= 19 ) {
+ } else if (m100 > 10 && m100 <= 19) {
pl_odtworz_plik(chan, language, audiofd, ctrlfd, ints, odm->nastki[m100 % 10]);
- } else if (m100 != 0) {
- if (odm->separator_dziesiatek[0]==' ') {
+ } else if (m100 > 20) {
+ if (odm->separator_dziesiatek[0] == ' ') {
pl_odtworz_plik(chan, language, audiofd, ctrlfd, ints, odm->dziesiatki[m100 / 10]);
pl_odtworz_plik(chan, language, audiofd, ctrlfd, ints, odm->cyfry2[m100 % 10]);
} else {