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
This commit is contained in:
Joshua Colp 2014-03-26 22:45:10 +00:00
parent fa3a2f8eca
commit 7dddd694cb
1 changed files with 6 additions and 6 deletions

View File

@ -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 {