From c308b83c69e0a2886595184b777f6cdaa39aa843 Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Wed, 7 Jun 2023 11:50:24 +0200 Subject: Beautifying --- src/SFileOpenFileEx.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/SFileOpenFileEx.cpp') diff --git a/src/SFileOpenFileEx.cpp b/src/SFileOpenFileEx.cpp index a14ffee..b5829b4 100644 --- a/src/SFileOpenFileEx.cpp +++ b/src/SFileOpenFileEx.cpp @@ -298,32 +298,32 @@ bool WINAPI SFileOpenFileEx(HANDLE hMpq, const char * szFileName, DWORD dwSearch if(dwErrCode == ERROR_SUCCESS) { // If we didn't find the file, try to open it using pseudo file name ("File - if (pFileEntry == NULL || (pFileEntry->dwFlags & MPQ_FILE_EXISTS) == 0) + if(pFileEntry == NULL || (pFileEntry->dwFlags & MPQ_FILE_EXISTS) == 0) { // Check the pseudo-file name ("File00000001.ext") - if ((bOpenByIndex = IsPseudoFileName(szFileName, &dwFileIndex)) == true) + if((bOpenByIndex = IsPseudoFileName(szFileName, &dwFileIndex)) == true) { // Get the file entry for the file - if (dwFileIndex < ha->dwFileTableSize) + if(dwFileIndex < ha->dwFileTableSize) { pFileEntry = ha->pFileTable + dwFileIndex; } } // Still not found? - if (pFileEntry == NULL) + if(pFileEntry == NULL || (pFileEntry->dwFlags & MPQ_FILE_EXISTS) == 0) { dwErrCode = ERROR_FILE_NOT_FOUND; } } // Perform some checks of invalid files - if (pFileEntry != NULL) + if(pFileEntry != NULL) { // MPQ protectors use insanely amount of fake files, often with very high size. // We won't open any files whose compressed size is bigger than archive size // If the file is not compressed, its size cannot be bigger than archive size - if ((pFileEntry->dwFlags & MPQ_FILE_COMPRESS_MASK) == 0 && (pFileEntry->dwFileSize > ha->FileSize)) + if((pFileEntry->dwFlags & MPQ_FILE_COMPRESS_MASK) == 0 && (pFileEntry->dwFileSize > ha->FileSize)) { dwErrCode = ERROR_FILE_CORRUPT; pFileEntry = NULL; -- cgit v1.2.3