diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index b6897b2303e..7c7df8fdcf4 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -1266,11 +1266,11 @@ char *_mktemp(char *pattern) pattern++; do { + *pattern = letter++; if (GetFileAttributesA(retVal) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND) return retVal; - *pattern = letter++; - } while(letter != '|'); + } while(letter <= 'z'); return NULL; }