Debian Codegraph @

debian/patches/espeak-stdin

raw
1 commit 33b6daf420710eca2f6b2dcdc8eb3f6d72e1d313
2 Author: Samuel Thibault <[email protected]>
3 Date: Sat Dec 21 00:07:12 2024 +0100
4
5 Fix dropping last byte of stdin input
6
7 This got broken with eaa0c9aa08350ce8a1343aed4c0a87c1cc329b0e ("Fix
8 truncated fgetc return value in main(espeak-ng.c). [Coverity]") which
9 rightfully stopped adding a bogus EOF at the end of the input, which
10 this line was probably dropping just by luck.
11
12 Fixes brailcom/speechd#978
13
14 diff --git a/src/espeak-ng.c b/src/espeak-ng.c
15 index ee63da70..2ea3791a 100644
16 --- a/src/espeak-ng.c
17 +++ b/src/espeak-ng.c
18 @@ -762,8 +762,8 @@ int main(int argc, char **argv)
19 }
20 }
21 if (ix > 0) {
22 - p_text[ix-1] = 0;
23 - espeak_Synth(p_text, ix+1, 0, POS_CHARACTER, 0, synth_flags, NULL, NULL);
24 + p_text[ix] = 0;
25 + espeak_Synth(p_text, ix, 0, POS_CHARACTER, 0, synth_flags, NULL, NULL);
26 }
27 }
28