mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
Fix: IniLoadFile::LoadFromDisk expects filename but BaseMedia::AddFile provided full path (#7348)
This commit is contained in:
parent
76788a1eb3
commit
04c74355ba
@ -159,9 +159,9 @@ bool BaseMedia<Tbase_set>::AddFile(const char *filename, size_t basepath_length,
|
||||
|
||||
Tbase_set *set = new Tbase_set();
|
||||
IniFile *ini = new IniFile();
|
||||
ini->LoadFromDisk(filename, BASESET_DIR);
|
||||
|
||||
char *path = stredup(filename + basepath_length);
|
||||
ini->LoadFromDisk(path, BASESET_DIR);
|
||||
|
||||
char *psep = strrchr(path, PATHSEPCHAR);
|
||||
if (psep != nullptr) {
|
||||
psep[1] = '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user