mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 23:50:25 +00:00
(svn r12943) -Fix: reading/modifying invalid data under some circumstances.
This commit is contained in:
parent
762315c47c
commit
0b8b5d1f3b
@ -315,7 +315,7 @@ FILE *FioFOpenFileSp(const char *filename, const char *mode, Searchpath sp, Subd
|
|||||||
f = fopen(buf, mode);
|
f = fopen(buf, mode);
|
||||||
#if !defined(WIN32)
|
#if !defined(WIN32)
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
strtolower(buf + strlen(_searchpaths[sp]) - 1);
|
strtolower(buf + ((subdir == NO_DIRECTORY) ? 0 : strlen(_searchpaths[sp]) - 1));
|
||||||
f = fopen(buf, mode);
|
f = fopen(buf, mode);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user