summaryrefslogtreecommitdiff
path: root/src/SFileOpenFileEx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/SFileOpenFileEx.cpp')
-rw-r--r--src/SFileOpenFileEx.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/SFileOpenFileEx.cpp b/src/SFileOpenFileEx.cpp
index 4c26699..a3aa901 100644
--- a/src/SFileOpenFileEx.cpp
+++ b/src/SFileOpenFileEx.cpp
@@ -443,15 +443,16 @@ bool WINAPI SFileOpenFileEx(HANDLE hMpq, const char * szFileName, DWORD dwSearch
nError = AllocatePatchInfo(hf, true);
}
- // Cleanup
+ // Cleanup and exit
if(nError != ERROR_SUCCESS)
{
SetLastError(nError);
FreeMPQFile(hf);
+ return false;
}
*phFile = hf;
- return (nError == ERROR_SUCCESS);
+ return true;
}
//-----------------------------------------------------------------------------