mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +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);
|
||||
#if !defined(WIN32)
|
||||
if (f == NULL) {
|
||||
strtolower(buf + strlen(_searchpaths[sp]) - 1);
|
||||
strtolower(buf + ((subdir == NO_DIRECTORY) ? 0 : strlen(_searchpaths[sp]) - 1));
|
||||
f = fopen(buf, mode);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user