- Fixed: RFF files constructed incorrect full names for the files they contained.

SVN r2217 (trunk)
This commit is contained in:
Randy Heit 2010-03-18 01:48:48 +00:00
parent 054e5411bd
commit 8e104d0a28
1 changed files with 10 additions and 5 deletions

View File

@ -163,17 +163,19 @@ bool FRFFFile::Open(bool quiet)
{ {
Lumps[i].Namespace = ns_global; Lumps[i].Namespace = ns_global;
} }
Lumps[i].Position = LittleLong(lumps[i].FilePos); Lumps[i].Position = LittleLong(lumps[i].FilePos);
Lumps[i].LumpSize = LittleLong(lumps[i].Size); Lumps[i].LumpSize = LittleLong(lumps[i].Size);
Lumps[i].Owner = this; Lumps[i].Owner = this;
if (lumps[i].Flags & 0x10) Lumps[i].Flags |= LUMPF_BLOODCRYPT; if (lumps[i].Flags & 0x10)
{
Lumps[i].Flags |= LUMPF_BLOODCRYPT;
}
// Rearrange the name and extension in a part of the lump record // Rearrange the name and extension in a part of the lump record
// that I don't have any use for in order to cnstruct the fullname. // that I don't have any use for in order to construct the fullname.
lumps[i].Name[8] = '\0'; lumps[i].Name[8] = '\0';
strcpy ((char *)lumps[i].IDontKnow, lumps[i].Name); strcpy ((char *)lumps[i].IDontKnow, lumps[i].Name);
strcat ((char *)lumps[i].IDontKnow, "."); strcat ((char *)lumps[i].IDontKnow, ".");
lumps[i].Name[0] = '\0';
strcat ((char *)lumps[i].IDontKnow, lumps[i].Extension); strcat ((char *)lumps[i].IDontKnow, lumps[i].Extension);
Lumps[i].LumpNameSetup((char *)lumps[i].IDontKnow); Lumps[i].LumpNameSetup((char *)lumps[i].IDontKnow);
} }
@ -183,7 +185,10 @@ bool FRFFFile::Open(bool quiet)
FRFFFile::~FRFFFile() FRFFFile::~FRFFFile()
{ {
if (Lumps != NULL) delete [] Lumps; if (Lumps != NULL)
{
delete[] Lumps;
}
} }