Commit cafa438d authored by Moti Zilberman's avatar Moti Zilberman Committed by Jean-Baptiste Kempf

SAPI: Fix an off-by-one error in voice selection

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 090e1f80
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment