mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 04:00:42 +00:00
- fixed: the file system's entry count was not updated before rehashing.
This broke Blood's RFS parser.
This commit is contained in:
parent
b98e06cd20
commit
94d3d643d7
1 changed files with 4 additions and 2 deletions
|
@ -837,6 +837,7 @@ void FileSystem::InitHashChains (void)
|
||||||
{
|
{
|
||||||
unsigned int i, j;
|
unsigned int i, j;
|
||||||
|
|
||||||
|
NumEntries = FileInfo.Size();
|
||||||
Hashes.Resize(8 * NumEntries);
|
Hashes.Resize(8 * NumEntries);
|
||||||
// Mark all buckets as empty
|
// Mark all buckets as empty
|
||||||
memset(Hashes.Data(), -1, Hashes.Size() * sizeof(Hashes[0]));
|
memset(Hashes.Data(), -1, Hashes.Size() * sizeof(Hashes[0]));
|
||||||
|
@ -1522,10 +1523,11 @@ const char *FileSystem::GetResourceFileFullName (int rfnum) const noexcept
|
||||||
|
|
||||||
bool FileSystem::CreatePathlessCopy(const char *name, int id, int /*flags*/)
|
bool FileSystem::CreatePathlessCopy(const char *name, int id, int /*flags*/)
|
||||||
{
|
{
|
||||||
FString name2, type2, path;
|
FString name2=name, type2, path;
|
||||||
|
|
||||||
// The old code said 'filename' and ignored the path, this looked like a bug.
|
// The old code said 'filename' and ignored the path, this looked like a bug.
|
||||||
auto lump = FindFile(name);
|
FixPathSeperator(name2);
|
||||||
|
auto lump = FindFile(name2);
|
||||||
if (lump < 0) return false; // Does not exist.
|
if (lump < 0) return false; // Does not exist.
|
||||||
|
|
||||||
auto oldlump = FileInfo[lump];
|
auto oldlump = FileInfo[lump];
|
||||||
|
|
Loading…
Reference in a new issue