Skip to content

Commit

Permalink
account for resorted directories when accessing the local file path a…
Browse files Browse the repository at this point in the history
…rray in file_directory.cpp
  • Loading branch information
coelckers committed Dec 31, 2023
1 parent f9b2532 commit ac8e80e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/common/filesystem/source/file_directory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ int FDirectory::AddDirectory(const char *dirpath, LumpFilterInfo* filter, FileSy
Entries[count].ResourceID = -1;
Entries[count].Method = METHOD_STORED;
Entries[count].Namespace = ns_global;
Entries[count].Position = count;
count++;
}
}
Expand Down Expand Up @@ -169,7 +170,7 @@ FileReader FDirectory::GetEntryReader(uint32_t entry, int readertype, int)
if (entry < NumLumps)
{
std::string fn = mBasePath;
fn += SystemFilePath[entry];
fn += SystemFilePath[Entries[entry].Position];
fr.OpenFile(fn.c_str());
if (readertype == READER_CACHED)
{
Expand Down

0 comments on commit ac8e80e

Please sign in to comment.