- Fixed: Timidity::Renderer::reset_voices() must completely zero the

voices. Because this wasn't done, note_on() could try to access
  the sample for a voice that had never been played yet and access
  random memory. There may be other places where it's a problem, but
  this is where I noticed it, by chance.


SVN r1182 (trunk)
This commit is contained in:
Randy Heit 2008-08-23 02:38:00 +00:00
parent 39bb50376a
commit 0e5587812e
3 changed files with 10 additions and 6 deletions

View file

@ -1,3 +1,10 @@
August 22, 2008
- Fixed: Timidity::Renderer::reset_voices() must completely zero the
voices. Because this wasn't done, note_on() could try to access
the sample for a voice that had never been played yet and access
random memory. There may be other places where it's a problem, but
this is where I noticed it, by chance.
August 21, 2008 (Changes by Graf Zahl)
- Fixed: The conversion of the strings in wbstartstruct_t to FStrings
caused crashes when reloading the hub data.

View file

@ -2818,7 +2818,7 @@ static void P_GroupLines (bool buildmap)
Printf ("---Group Lines Times---\n");
for (i = 0; i < 7; ++i)
{
Printf (" time %d:%9.4f ms\n", i, times[i].Time() * 1e3);
Printf (" time %d:%9.4f ms\n", i, times[i].TimeMS());
}
}
}
@ -3553,7 +3553,7 @@ void P_SetupLevel (char *lumpname, int position)
"init polys",
"precache"
};
Printf ("Time%3d:%9.4f ms (%s)\n", i, times[i].Time() * 1e3, timenames[i]);
Printf ("Time%3d:%9.4f ms (%s)\n", i, times[i].TimeMS(), timenames[i]);
}
}
MapThingsConverted.Clear();

View file

@ -36,10 +36,7 @@ namespace Timidity
void Renderer::reset_voices()
{
for (int i = 0; i < voices; i++)
{
voice[i].status = 0;
}
memset(voice, 0, sizeof(voice[0]) * voices);
}
/* Process the Reset All Controllers event */