mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-15 00:42:20 +00:00
Fix some minor KEYCONV and VOC memory issues
This commit is contained in:
parent
06eee55671
commit
c03b272062
2 changed files with 4 additions and 5 deletions
|
@ -749,9 +749,8 @@ sfxinfo_t *SoundEngine::LoadSound(sfxinfo_t *sfx)
|
|||
{
|
||||
auto sfxp = sfxdata.data();
|
||||
int32_t dmxlen = LittleLong(((int32_t *)sfxp)[1]);
|
||||
|
||||
// If the sound is voc, use the custom loader.
|
||||
if (memcmp (sfxp, "Creative Voice File", 19) == 0)
|
||||
if (size > 19 && memcmp (sfxp, "Creative Voice File", 19) == 0)
|
||||
{
|
||||
sfx->data = GSnd->LoadSoundVoc(sfxp, size);
|
||||
}
|
||||
|
|
|
@ -171,7 +171,7 @@ void D_LoadWadSettings ()
|
|||
|
||||
while (conf < eof)
|
||||
{
|
||||
size_t i;
|
||||
size_t i = 0;
|
||||
|
||||
// Fetch a line to execute
|
||||
command.Clear();
|
||||
|
@ -179,14 +179,14 @@ void D_LoadWadSettings ()
|
|||
{
|
||||
command.Push(conf[i]);
|
||||
}
|
||||
if (i == 0)
|
||||
if (i == 0) // Blank line
|
||||
{
|
||||
conf++;
|
||||
continue;
|
||||
}
|
||||
command.Push(0);
|
||||
conf += i;
|
||||
if (*conf == '\n')
|
||||
if (conf >= eof || *conf == '\n')
|
||||
{
|
||||
conf++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue