[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH (speechd-up) 2/2] Refuse to speak strings consisting only of nonp
From: |
Christopher Brannon |
Subject: |
[PATCH (speechd-up) 2/2] Refuse to speak strings consisting only of nonprintable characters. |
Date: |
Wed, 17 Feb 2010 10:14:05 -0600 |
---
speechd-up.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/speechd-up.c b/speechd-up.c
index 532bd14..9d802f0 100644
--- a/speechd-up.c
+++ b/speechd-up.c
@@ -477,9 +477,10 @@ speak(char *text)
utf8_text = recode_text(character);
LOG(5, "Sending to speechd as character: |%s|", utf8_text);
spd_ret = say_single_character(utf8_text);
- }else{
+ }else if (printables > 1) {
spd_ret = speak_string(text);
}
+ /* Else printables is 0, nothing to do. */
if (spd_ret != 0)
ret = -2;
--
1.6.6.1