Merged revisions 295949 via svnmerge from
authorOlle Johansson <oej@edvina.net>
Tue, 23 Nov 2010 10:34:17 +0000 (10:34 +0000)
committerOlle Johansson <oej@edvina.net>
Tue, 23 Nov 2010 10:34:17 +0000 (10:34 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r295949 | oej | 2010-11-23 11:30:05 +0100 (Tis, 23 Nov 2010) | 21 lines

  Merged revisions 295907 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2

  ................
    r295907 | oej | 2010-11-23 10:36:38 +0100 (Tis, 23 Nov 2010) | 14 lines

    Merged revisions 295906 via svnmerge from
    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/trunk@295950 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/say.c

index 267137b..5ae7c12 100644 (file)
@@ -2231,15 +2231,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));