summaryrefslogtreecommitdiff
path: root/drivers/staging/speakup
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2017-03-14 20:56:21 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-16 11:14:14 +0900
commit0b4139ad5e654b53c593aa84eb6bf36eb6644512 (patch)
treec27e3b32a2d3bff6d57cd6f8c678c05fb47fe699 /drivers/staging/speakup
parenta50ef3165489c74c7d7c9f7559d9bbb198dca154 (diff)
speakup: Fix bogus caps on speaking unicode characters
commit 33590c185299 ("speakup: Support spelling unicode characters") mistakenly passed unicode characters to IS_CHAR(), which only supports latin1. Let's assume non-latin1 is lower case, like is done in spell_word(). Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Chris Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/speakup')
-rw-r--r--drivers/staging/speakup/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
index dc07b2328bc0..6f1595737553 100644
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -433,12 +433,12 @@ static void speak_char(u16 ch)
struct var_t *direct = spk_get_var(DIRECT);
if (ch >= 0x100 || (direct && direct->u.n.value)) {
- if (IS_CHAR(ch, B_CAP)) {
+ if (ch < 0x100 && IS_CHAR(ch, B_CAP)) {
spk_pitch_shift++;
synth_printf("%s", spk_str_caps_start);
}
synth_putwc_s(ch);
- if (IS_CHAR(ch, B_CAP))
+ if (ch < 0x100 && IS_CHAR(ch, B_CAP))
synth_printf("%s", spk_str_caps_stop);
return;
}