diff options
Diffstat (limited to 'common/file.cpp')
-rw-r--r-- | common/file.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/file.cpp b/common/file.cpp index ff666e820a..7168c74f82 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -71,16 +71,16 @@ FILE *File::fopenNoCase(const char *filename, const char *directory, const char ptr = buf + len; do - *ptr++ = toupper(*ptr); - while (*ptr); + *ptr = toupper(*ptr); + while (*ptr++); file = fopen(buf, mode); if (file) return file; ptr = buf + len; do - *ptr++ = tolower(*ptr); - while (*ptr); + *ptr = tolower(*ptr); + while (*ptr++); file = fopen(buf, mode); if (file) return file; |