mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-11 00:34:27 +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