mirror of
https://github.com/linux-speakup/espeakup.git
synced 2026-08-09 09:19:09 +02:00
fixed a bug in process_command
One of the switch statements in process_command did not have a default label, which lead to undefined behavior. Thanks to Chris Brannon for the patch.
This commit is contained in:
parent
36b05aec41
commit
a3901a7e4c
1 changed files with 4 additions and 1 deletions
|
|
@ -80,6 +80,9 @@ static int process_command(struct synth_t *s, char *buf, int start)
|
|||
case 'v':
|
||||
cmd = CMD_SET_VOLUME;
|
||||
break;
|
||||
default:
|
||||
cmd = CMD_UNKNOWN;
|
||||
break;
|
||||
}
|
||||
cp++;
|
||||
break;
|
||||
|
|
@ -171,7 +174,7 @@ void main_loop(struct synth_t *s)
|
|||
if (cp) {
|
||||
queue_clear();
|
||||
stop_speech();
|
||||
memmove(buf, cp+1, strlen(cp + 1) + 1);
|
||||
memmove(buf, cp + 1, strlen(cp + 1) + 1);
|
||||
length = strlen(buf);
|
||||
}
|
||||
process_buffer(s, buf, length);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue