mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 09:21:12 +00:00
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:
parent
fdd84d1870
commit
a4ba86ee31
1 changed files with 3 additions and 1 deletions
|
@ -1820,7 +1820,6 @@ int32_t MV_StartDemandFeedPlayback
|
|||
voice->DemandFeed = function;
|
||||
voice->LoopStart = NULL;
|
||||
voice->LoopCount = 0;
|
||||
voice->BlockLength = 0;
|
||||
voice->position = 0;
|
||||
voice->sound = NULL;
|
||||
voice->length = 0;
|
||||
|
@ -1913,6 +1912,7 @@ int32_t MV_PlayLoopedRaw
|
|||
voice->channels = 1;
|
||||
voice->GetSound = MV_GetNextRawBlock;
|
||||
voice->Playing = TRUE;
|
||||
voice->Paused = FALSE;
|
||||
voice->NextBlock = ptr;
|
||||
voice->position = 0;
|
||||
voice->BlockLength = length;
|
||||
|
@ -2282,6 +2282,8 @@ int32_t MV_PlayLoopedVOC
|
|||
return(MV_Error);
|
||||
}
|
||||
|
||||
voice->Playing = TRUE;
|
||||
voice->Paused = FALSE;
|
||||
voice->wavetype = VOC;
|
||||
voice->bits = 8;
|
||||
voice->channels = 1;
|
||||
|
|
Loading…
Reference in a new issue