From 7fee8a448a570a71f11a2fd2279fc34c6a890dfe Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 5 Mar 2009 03:08:15 +0000 Subject: [PATCH] MODLANG-100 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12431 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_ivr_play_say.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/switch_ivr_play_say.c b/src/switch_ivr_play_say.c index 6b7e48c7d6..c61c68cd92 100644 --- a/src/switch_ivr_play_say.c +++ b/src/switch_ivr_play_say.c @@ -1446,7 +1446,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_read(switch_core_session_t *session, switch_input_args_t args = { 0 }; switch_status_t status = SWITCH_STATUS_SUCCESS; char terminator; - size_t len; + size_t len = 0; switch_assert(session); @@ -1510,6 +1510,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_read(switch_core_session_t *session, end: + if (max_digits == 1 && len == 1 && valid_terminators && strchr(valid_terminators, *digit_buffer)) { + *digit_buffer = '\0'; + } + if (var_name && !switch_strlen_zero(digit_buffer)) { switch_channel_set_variable(channel, var_name, digit_buffer); }