diff options
Diffstat (limited to 'apps/app_speech_utils.c')
-rw-r--r-- | apps/app_speech_utils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c index 939a92f58..c90bc8b50 100644 --- a/apps/app_speech_utils.c +++ b/apps/app_speech_utils.c @@ -202,6 +202,8 @@ static int speech_text(struct ast_channel *chan, const char *cmd, char *data, if (result->text != NULL) { ast_copy_string(buf, result->text, len); + } else { + buf[0] = '\0'; } return 0; @@ -230,6 +232,8 @@ static int speech_grammar(struct ast_channel *chan, const char *cmd, char *data, if (result->grammar != NULL) { ast_copy_string(buf, result->grammar, len); + } else { + buf[0] = '\0'; } return 0; @@ -330,6 +334,8 @@ static int speech_read(struct ast_channel *chan, const char *cmd, char *data, results++; snprintf(tmp, sizeof(tmp), "%d", results); ast_copy_string(buf, tmp, len); + } else { + buf[0] = '\0'; } return 0; |