]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 295906 via svnmerge from
authorOlle Johansson <oej@edvina.net>
Tue, 23 Nov 2010 09:36:38 +0000 (09:36 +0000)
committerOlle Johansson <oej@edvina.net>
Tue, 23 Nov 2010 09:36:38 +0000 (09:36 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r295906 | oej | 2010-11-23 10:28:14 +0100 (Tis, 23 Nov 2010) | 8 lines

  Fix support of saynumber(1,n) in the Swedish language

  (closes issue #18353)
  Reported by: oej

  Review: https://reviewboard.asterisk.org/r/1031/
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@295907 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/say.c

index 9ff16b875196c0de3ae7b6885b26b877b482ec43..a669a972659addc4bf0fbd068b041dcca9769273 100644 (file)
@@ -2213,15 +2213,15 @@ static int ast_say_number_full_se(struct ast_channel *chan, int num, const char
                } else if (playh) {
                        ast_copy_string(fn, "digits/hundred", sizeof(fn));
                        playh = 0;
+               } else if (num == 1 && cn == -1) {      /* En eller ett? */
+                       ast_copy_string(fn, "digits/1N", sizeof(fn));
+                       num = 0;
                } else if (num < 20) {
                        snprintf(fn, sizeof(fn), "digits/%d", num);
                        num = 0;
                } else if (num < 100) {
                        snprintf(fn, sizeof(fn), "digits/%d", (num /10) * 10);
                        num %= 10;
-               } else if (num == 1 && cn == -1) {      /* En eller ett? */
-                       ast_copy_string(fn, "digits/1N", sizeof(fn));
-                       num = 0;
                } else {
                        if (num < 1000){
                                snprintf(fn, sizeof(fn), "digits/%d", (num/100));