aboutsummaryrefslogtreecommitdiff
path: root/src/SFileOpenFileEx.cpp
diff options
context:
space:
mode:
authorLadislav Zezula <zezula@volny.cz>2025-08-06 09:38:55 +0200
committerGitHub <noreply@github.com>2025-08-06 09:38:55 +0200
commit36d76cddbfa02624617bb112da0b72e919f0cf33 (patch)
treecbe34ab3d2d2c7ab784ba890b7d2a3436bb6795b /src/SFileOpenFileEx.cpp
parentb41cda40f9c3fbdb802cf63e739425cd805eecaa (diff)
parentdb410fd564af358cb7c1e2e72cdbaeaeef510e09 (diff)
Merge pull request #393 from ladislav-zezula/LZ_BlizzardCompatibleNames
* Replaced GetLastError with SErrGetLastError * Members of TMPQHash have now the same names like in Blizzard sources * Fixed bug in SFileRenameFile that falsely reported an existing file if it had different locale.
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;
}