diff --git a/src/mod/say/mod_say_es/mod_say_es.c b/src/mod/say/mod_say_es/mod_say_es.c index 934db92def..efda97b468 100644 --- a/src/mod/say/mod_say_es/mod_say_es.c +++ b/src/mod/say/mod_say_es/mod_say_es.c @@ -364,6 +364,7 @@ static switch_status_t es_say_money(switch_core_session_t *session, char *tosay, char sbuf[16] = ""; /* enough for 999,999,999,999.99 (w/o the commas or leading $) */ char *dollars = NULL; char *cents = NULL; + switch_status_t status; if (strlen(tosay) > 15 || !switch_strip_nonnumerics(tosay, sbuf, sizeof(sbuf)-1)) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); @@ -391,7 +392,9 @@ static switch_status_t es_say_money(switch_core_session_t *session, char *tosay, } /* Say dollar amount */ - es_say_general_count(session, dollars, say_args, args); + if ((status = es_say_general_count(session, dollars, say_args, args)) != SWITCH_STATUS_SUCCESS) { + return status; + } if (atoi(dollars) == 1) { say_file("currency/dollar.wav"); } else { @@ -403,7 +406,9 @@ static switch_status_t es_say_money(switch_core_session_t *session, char *tosay, /* Say cents */ if (cents) { - es_say_general_count(session, cents, say_args, args); + if ((status = es_say_general_count(session, cents, say_args, args)) != SWITCH_STATUS_SUCCESS) { + return status; + } if (atoi(cents) == 1) { say_file("currency/cent.wav"); } else {