diff options
author | Ladislav Zezula <zezula@volny.cz> | 2025-08-06 09:38:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-06 09:38:55 +0200 |
commit | 36d76cddbfa02624617bb112da0b72e919f0cf33 (patch) | |
tree | cbe34ab3d2d2c7ab784ba890b7d2a3436bb6795b /src/SFileExtractFile.cpp | |
parent | b41cda40f9c3fbdb802cf63e739425cd805eecaa (diff) | |
parent | db410fd564af358cb7c1e2e72cdbaeaeef510e09 (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/SFileExtractFile.cpp')
-rw-r--r-- | src/SFileExtractFile.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/SFileExtractFile.cpp b/src/SFileExtractFile.cpp index 6b3b767..b65410c 100644 --- a/src/SFileExtractFile.cpp +++ b/src/SFileExtractFile.cpp @@ -22,7 +22,7 @@ bool WINAPI SFileExtractFile(HANDLE hMpq, const char * szToExtract, const TCHAR if(dwErrCode == ERROR_SUCCESS) { if(!SFileOpenFileEx(hMpq, szToExtract, dwSearchScope, &hMpqFile)) - dwErrCode = GetLastError(); + dwErrCode = SErrGetLastError(); } // Create the local file @@ -30,7 +30,7 @@ bool WINAPI SFileExtractFile(HANDLE hMpq, const char * szToExtract, const TCHAR { pLocalFile = FileStream_CreateFile(szExtracted, 0); if(pLocalFile == NULL) - dwErrCode = GetLastError(); + dwErrCode = SErrGetLastError(); } // Copy the file's content @@ -42,7 +42,7 @@ bool WINAPI SFileExtractFile(HANDLE hMpq, const char * szToExtract, const TCHAR // dwTransferred is only set to nonzero if something has been read. // dwErrCode can be ERROR_SUCCESS or ERROR_HANDLE_EOF if(!SFileReadFile(hMpqFile, szBuffer, sizeof(szBuffer), &dwTransferred, NULL)) - dwErrCode = GetLastError(); + dwErrCode = SErrGetLastError(); if(dwErrCode == ERROR_HANDLE_EOF) dwErrCode = ERROR_SUCCESS; if(dwTransferred == 0) @@ -50,7 +50,7 @@ bool WINAPI SFileExtractFile(HANDLE hMpq, const char * szToExtract, const TCHAR // If something has been actually read, write it if(!FileStream_Write(pLocalFile, NULL, szBuffer, dwTransferred)) - dwErrCode = GetLastError(); + dwErrCode = SErrGetLastError(); } // Close the files @@ -59,6 +59,6 @@ bool WINAPI SFileExtractFile(HANDLE hMpq, const char * szToExtract, const TCHAR if(pLocalFile != NULL) FileStream_Close(pLocalFile); if(dwErrCode != ERROR_SUCCESS) - SetLastError(dwErrCode); + SErrSetLastError(dwErrCode); return (dwErrCode == ERROR_SUCCESS); } |