aboutsummaryrefslogtreecommitdiff
path: root/src/SFileOpenFileEx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/SFileOpenFileEx.cpp')
-rw-r--r--src/SFileOpenFileEx.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/SFileOpenFileEx.cpp b/src/SFileOpenFileEx.cpp
index 2954669..e555303 100644
--- a/src/SFileOpenFileEx.cpp
+++ b/src/SFileOpenFileEx.cpp
@@ -97,7 +97,7 @@ static bool OpenLocalFile(const char * szFileName, HANDLE * PtrFile)
else
{
FileStream_Close(pStream);
- SetLastError(ERROR_NOT_ENOUGH_MEMORY);
+ SErrSetLastError(ERROR_NOT_ENOUGH_MEMORY);
}
}
*PtrFile = NULL;
@@ -160,14 +160,14 @@ bool OpenPatchedFile(HANDLE hMpq, const char * szFileName, HANDLE * PtrFile)
if(hfBase && hf && hf->pFileEntry->dwFlags & MPQ_FILE_DELETE_MARKER)
{
SFileCloseFile((HANDLE)(hfBase));
- SetLastError(ERROR_FILE_DELETED);
+ SErrSetLastError(ERROR_FILE_DELETED);
hfBase = NULL;
}
}
}
else
{
- SetLastError(ERROR_FILE_NOT_FOUND);
+ SErrSetLastError(ERROR_FILE_NOT_FOUND);
}
// Give the updated base MPQ
@@ -397,7 +397,7 @@ bool WINAPI SFileOpenFileEx(HANDLE hMpq, const char * szFileName, DWORD dwSearch
// Return error code
if(dwErrCode != ERROR_SUCCESS)
- SetLastError(dwErrCode);
+ SErrSetLastError(dwErrCode);
return (dwErrCode == ERROR_SUCCESS);
}
@@ -421,7 +421,7 @@ bool WINAPI SFileCloseFile(HANDLE hFile)
if(!IsValidFileHandle(hFile))
{
- SetLastError(ERROR_INVALID_HANDLE);
+ SErrSetLastError(ERROR_INVALID_HANDLE);
return false;
}