mirror of https://github.com/OpenTTD/OpenTTD
(svn r12943) -Fix: reading/modifying invalid data under some circumstances.
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