[vlc-commits] SAPI: Fix an off-by-one error in voice selection
Moti Zilberman
git at videolan.org
Mon Oct 12 16:30:32 CEST 2015
vlc | branch: master | Moti Zilberman <motiz88 at gmail.com> | Mon Oct 12 12:55:58 2015 +0300| [cafa438d2109a48d17a07b9078953b54cf1afc9c] | committer: Jean-Baptiste Kempf
SAPI: Fix an off-by-one error in voice selection
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cafa438d2109a48d17a07b9078953b54cf1afc9c
---
modules/text_renderer/sapi.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/text_renderer/sapi.cpp b/modules/text_renderer/sapi.cpp
index 501cdef..9f183b6 100644
--- a/modules/text_renderer/sapi.cpp
+++ b/modules/text_renderer/sapi.cpp
@@ -124,7 +124,7 @@ static int Create (vlc_object_t *p_this)
int voiceIndex = var_InheritInteger(p_this, "sapi-voice");
if (voiceIndex > -1)
{
- if ((unsigned)voiceIndex <= ulCount) {
+ if ((unsigned)voiceIndex < ulCount) {
hr = cpEnum->Item(voiceIndex, &cpVoiceToken);
if (SUCCEEDED(hr)) {
hr = p_sys->cpVoice->SetVoice(cpVoiceToken);
More information about the vlc-commits
mailing list