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].

This commit is contained in:
Reece H. Dunn
2018-03-07 12:56:26 +00:00
parent c49164334b
commit c5f88c51dd
+1 -1
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);