aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/app_morsecode.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/app_morsecode.c b/apps/app_morsecode.c
index 2870d5afe..45b3c67a8 100644
--- a/apps/app_morsecode.c
+++ b/apps/app_morsecode.c
@@ -130,11 +130,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 == '.') {