mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-27 22:43:36 +00:00
Avoid uninitialized use of max_end
This commit is contained in:
parent
f5f85a1dfe
commit
13fb940262
1 changed files with 5 additions and 3 deletions
|
@ -3373,12 +3373,14 @@ fixup_sample (SFData * sf)
|
|||
p = sf->sample;
|
||||
while (p)
|
||||
{
|
||||
/* Standard SoundFont files (SF2) use sample word indices for sample start and end pointers,
|
||||
* but SF3 files with Ogg Vorbis compression use byte indices for start and end. */
|
||||
unsigned int max_end = (sam->sampletype & FLUID_SAMPLETYPE_OGG_VORBIS) ? total_bytes : total_samples;
|
||||
unsigned int max_end;
|
||||
|
||||
sam = (SFSample *) (p->data);
|
||||
|
||||
/* Standard SoundFont files (SF2) use sample word indices for sample start and end pointers,
|
||||
* but SF3 files with Ogg Vorbis compression use byte indices for start and end. */
|
||||
max_end = (sam->sampletype & FLUID_SAMPLETYPE_OGG_VORBIS) ? total_bytes : total_samples;
|
||||
|
||||
/* ROM samples are unusable for us by definition, so simply ignore them. */
|
||||
if (sam->sampletype & FLUID_SAMPLETYPE_ROM)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue