Fix potential segfault when reading sentences.txt

This commit is contained in:
Roman Chistokhodov 2019-09-20 21:28:52 +03:00 committed by Alibek Omarov
parent 70c4279c25
commit cb51d2aa17
1 changed files with 2 additions and 2 deletions

View File

@ -1281,9 +1281,9 @@ void SENTENCEG_Init()
if( !buffer[j] )
continue;
if( gcallsentences > CVOXFILESENTENCEMAX )
if( gcallsentences >= CVOXFILESENTENCEMAX )
{
ALERT( at_error, "Too many sentences in sentences.txt!\n" );
ALERT( at_error, "Too many sentences in sentences.txt! >%d\n", gcallsentences );
break;
}