From cb51d2aa179f1eb622e08c1c07b053ccd49e40a5 Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Fri, 20 Sep 2019 21:28:52 +0300 Subject: [PATCH] Fix potential segfault when reading sentences.txt --- dlls/sound.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/sound.cpp b/dlls/sound.cpp index 6637fe53..acc2dbf7 100644 --- a/dlls/sound.cpp +++ b/dlls/sound.cpp @@ -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; }