Browse Source

translate.c: Don't loop to the end of sbuf, as sbuf gets null terminated, so needs a byte for the null character. [msvc /analyze].

master
Reece H. Dunn 7 years ago
parent
commit
c5f88c51dd
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/libespeak-ng/translate.c

+ 1
- 1
src/libespeak-ng/translate.c View File

@@ -2074,7 +2074,7 @@ void TranslateClause(Translator *tr, int *tone_out, char **voice_change)
}
words[0].length = k;

while (!finished && (ix < (int)sizeof(sbuf)) && (n_ph_list2 < N_PHONEME_LIST-4)) {
while (!finished && (ix < (int)sizeof(sbuf) - 1) && (n_ph_list2 < N_PHONEME_LIST-4)) {
prev_out2 = prev_out;
utf8_in2(&prev_out, &sbuf[ix-1], 1);


Loading…
Cancel
Save