Explicitly initialize voice->Playing and voice->Paused members in some sound

playback functions. Without these, there would be an uninitialized access
in line 444 of multivoc.c (if the memory in question was allocated with malloc,
but still...)

git-svn-id: https://svn.eduke32.com/eduke32@2101 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-11-01 22:02:54 +00:00
parent fdd84d1870
commit a4ba86ee31

View file

@ -1820,7 +1820,6 @@ int32_t MV_StartDemandFeedPlayback
voice->DemandFeed = function; voice->DemandFeed = function;
voice->LoopStart = NULL; voice->LoopStart = NULL;
voice->LoopCount = 0; voice->LoopCount = 0;
voice->BlockLength = 0;
voice->position = 0; voice->position = 0;
voice->sound = NULL; voice->sound = NULL;
voice->length = 0; voice->length = 0;
@ -1913,6 +1912,7 @@ int32_t MV_PlayLoopedRaw
voice->channels = 1; voice->channels = 1;
voice->GetSound = MV_GetNextRawBlock; voice->GetSound = MV_GetNextRawBlock;
voice->Playing = TRUE; voice->Playing = TRUE;
voice->Paused = FALSE;
voice->NextBlock = ptr; voice->NextBlock = ptr;
voice->position = 0; voice->position = 0;
voice->BlockLength = length; voice->BlockLength = length;
@ -2282,6 +2282,8 @@ int32_t MV_PlayLoopedVOC
return(MV_Error); return(MV_Error);
} }
voice->Playing = TRUE;
voice->Paused = FALSE;
voice->wavetype = VOC; voice->wavetype = VOC;
voice->bits = 8; voice->bits = 8;
voice->channels = 1; voice->channels = 1;