aboutsummaryrefslogtreecommitdiff
path: root/src/SFileOpenFileEx.cpp
diff options
context:
space:
mode:
authorLadislav Zezula <ladislav.zezula@avg.com>2013-10-11 15:51:18 +0200
committerLadislav Zezula <ladislav.zezula@avg.com>2013-10-11 15:51:18 +0200
commit16f2797b8cadde9446d8c9bd694c265f8a058cda (patch)
tree3859c6a7aa491e35e18c442d3332edf86b0f8b25 /src/SFileOpenFileEx.cpp
parent450713b69f2c834cff79434ba5ad8133aac1e400 (diff)
+ Support for SQP files
+ Several checks added (thanks Dmitry "Vortex" Koteroff) + Fixed zlib + StormLib no longer changes "/" to "\". Hopefully this won't be problem for Linux and Mac people
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;
}
//-----------------------------------------------------------------------------