Skip to content

Commit

Permalink
Fixed potential use of an uninitialized variable in jHexen's P_Archiv…
Browse files Browse the repository at this point in the history
…eSounds and P_UnArchiveSounds.
  • Loading branch information
danij committed May 26, 2009
1 parent bbdf797 commit baf6c06
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doomsday/plugins/common/src/p_saveg.c
Expand Up @@ -4391,9 +4391,11 @@ static void P_ArchiveSounds(void)
SV_WriteLong(node->volume);
SV_WriteLong(SN_GetSequenceOffset(node->sequence, node->sequencePtr));
SV_WriteLong(node->currentSoundID);

i = 0;
if(node->mobj)
{
for(i = 0; i < numpolyobjs; ++i)
for(; i < numpolyobjs; ++i)
{
if(node->mobj == (mobj_t*) P_GetPolyobj(i | 0x80000000))
{
Expand Down Expand Up @@ -4424,7 +4426,7 @@ static void P_UnArchiveSounds(void)
int numSequences, sequence, seqOffset;
int delayTics, soundID, volume;
int polySnd, secNum, ver;
mobj_t* sndMobj;
mobj_t* sndMobj = NULL;

AssertSegment(ASEG_SOUNDS);

Expand Down

0 comments on commit baf6c06

Please sign in to comment.