- Changed FScanner so that opening a lump gives the complete wad+lump name
rather than a generic one, so identifying errors among files that all have the same lump name no longer involves any degree of guesswork in determining exactly which file the error occurred in. - Added a check to S_ParseSndSeq() for SNDSEQ lumps with unterminated final sequences. - Fixed: Parts of s_sndseq.cpp that scan the Sequences array need NULL pointer checks, in case an improper sequence was encountered during parsing but not early enough to avoid creating a slot for it in the array. SVN r874 (trunk)
This commit is contained in:
parent
b430977adf
commit
d2c275bbb3
24 changed files with 65 additions and 32 deletions
|
|
@ -432,7 +432,7 @@ static void AssignHexenTranslations (void)
|
|||
{
|
||||
for (seq = 0; seq < Sequences.Size(); seq++)
|
||||
{
|
||||
if (HexenSequences[i].Name == Sequences[seq]->SeqName)
|
||||
if (Sequences[seq] != NULL && HexenSequences[i].Name == Sequences[seq]->SeqName)
|
||||
break;
|
||||
}
|
||||
if (seq == Sequences.Size())
|
||||
|
|
@ -499,7 +499,7 @@ void S_ParseSndSeq (int levellump)
|
|||
lump = levellump;
|
||||
levellump = -2;
|
||||
}
|
||||
FScanner sc(lump, "SNDSEQ");
|
||||
FScanner sc(lump);
|
||||
while (sc.GetString ())
|
||||
{
|
||||
bool bDoorSound = false;
|
||||
|
|
@ -514,7 +514,7 @@ void S_ParseSndSeq (int levellump)
|
|||
seqtype = sc.String[0];
|
||||
for (curseq = 0; curseq < (int)Sequences.Size(); curseq++)
|
||||
{
|
||||
if (Sequences[curseq]->SeqName == seqname)
|
||||
if (Sequences[curseq] != NULL && Sequences[curseq]->SeqName == seqname)
|
||||
{
|
||||
M_Free (Sequences[curseq]);
|
||||
Sequences[curseq] = NULL;
|
||||
|
|
@ -684,6 +684,10 @@ void S_ParseSndSeq (int levellump)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (curseq > 0)
|
||||
{
|
||||
sc.ScriptError("End of file encountered before the final sequence ended.");
|
||||
}
|
||||
}
|
||||
|
||||
if (gameinfo.gametype == GAME_Hexen)
|
||||
|
|
@ -883,7 +887,7 @@ static int FindSequence (FName seqname)
|
|||
|
||||
for (i = Sequences.Size(); i-- > 0; )
|
||||
{
|
||||
if (seqname == Sequences[i]->SeqName)
|
||||
if (Sequences[i] != NULL && seqname == Sequences[i]->SeqName)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue