- Fix a broken check
- Plug a memory leak

svn path=/trunk/; revision=69241
This commit is contained in:
Pierre Schweitzer 2015-09-15 11:14:58 +00:00
parent 520dcf77b7
commit b987b1571e

View file

@ -100,9 +100,10 @@ INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *d
hFileDest = CreateFile(dest, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING,
0, NULL);
if (hFileSrc == INVALID_HANDLE_VALUE)
if (hFileDest == INVALID_HANDLE_VALUE)
{
ConOutResPrintf(STRING_COPY_ERROR1, dest);
CloseHandle (hFileSrc);
return 0;
}