diff --git a/src/fileio.cpp b/src/fileio.cpp index ae2763fd9b..e966208fb7 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -279,7 +279,7 @@ char *FioFindFullPath(char *buf, size_t buflen, Subdirectory subdir, const char /* Be, as opening files, aware that sometimes the filename * might be in uppercase when it is in lowercase on the * disk. Ofcourse Windows doesn't care about casing. */ - strtolower(buf + ((subdir == NO_DIRECTORY) ? 0 : strlen(_searchpaths[sp]) - 1)); + strtolower(buf + strlen(_searchpaths[sp]) - 1); if (FileExists(buf)) break; #endif }