]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Allow app_morsecode to build on PPC Linux by putting the value of the digit char...
authorJoshua Colp <jcolp@digium.com>
Mon, 23 Jul 2007 17:48:51 +0000 (17:48 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 23 Jul 2007 17:48:51 +0000 (17:48 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76618 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_morsecode.c

index cd42112318d8ddf56e99271f000c1ad122ce9829..aec946a098912c4facbb3ad6aa47f655534fea63 100644 (file)
@@ -134,11 +134,12 @@ static int morsecode_exec(struct ast_channel *chan, void *data)
        }
 
        for (digit = data; *digit; digit++) {
+               int digit2 = *digit;
                char *dahdit;
-               if (*digit < 0) {
+               if (digit2 < 0) {
                        continue;
                }
-               for (dahdit = morsecode[(int)*digit]; *dahdit; dahdit++) {
+               for (dahdit = morsecode[digit2]; *dahdit; dahdit++) {
                        if (*dahdit == '-') {
                                playtone(chan, tone, 3 * ditlen);
                        } else if (*dahdit == '.') {