diff options
Diffstat (limited to 'dep/CascLib/src/CascOpenStorage.cpp')
-rw-r--r-- | dep/CascLib/src/CascOpenStorage.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/dep/CascLib/src/CascOpenStorage.cpp b/dep/CascLib/src/CascOpenStorage.cpp index 16f0c28da48..909c45c8f94 100644 --- a/dep/CascLib/src/CascOpenStorage.cpp +++ b/dep/CascLib/src/CascOpenStorage.cpp @@ -1072,7 +1072,7 @@ static bool GetStoragePathProduct(TCascStorage * hs, void * pvStorageInfo, size_ // Append the product code name, if any if(hs->szCodeName != NULL) { - *szBuffer++ = _T(':'); + *szBuffer++ = _T(CASC_PARAM_SEPARATOR); CascStrCopy(szBuffer, (szBufferEnd - szBuffer), hs->szCodeName); szBuffer += _tcslen(hs->szCodeName); } @@ -1080,7 +1080,7 @@ static bool GetStoragePathProduct(TCascStorage * hs, void * pvStorageInfo, size_ // Append the product region, if any if(hs->szRegion != NULL) { - *szBuffer++ = _T(':'); + *szBuffer++ = _T(CASC_PARAM_SEPARATOR); CascStrCopy(szBuffer, (szBufferEnd - szBuffer), hs->szRegion); } } @@ -1209,10 +1209,7 @@ static DWORD LoadCascStorage(TCascStorage * hs, PCASC_OPEN_STORAGE_ARGS pArgs, L // Failing to select storage on them will lead to the first-in-order file in the list being loaded. // Example: WoW build 32144, file: DBFilesClient\Achievement.db2, file data ID: 1260179 // Locales: koKR frFR deDE zhCN esES zhTW enUS&enGB esMX ruRU itIT ptBT&ptPT (in order of appearance in the build manifest) - if(dwLocaleMask == 0) - { - dwLocaleMask = hs->dwDefaultLocale; - } + dwLocaleMask = (dwLocaleMask != 0) ? dwLocaleMask : hs->dwDefaultLocale; // Continue loading the manifest dwErrCode = LoadBuildManifest(hs, dwLocaleMask); @@ -1250,10 +1247,10 @@ static DWORD LoadCascStorage(TCascStorage * hs, PCASC_OPEN_STORAGE_ARGS pArgs, L return dwErrCode; } -// Check for URL pattern. Note that the string may be terminated by ':' instead of '\0' +// Check for URL pattern. Note that the string may be terminated by CASC_PARAM_SEPARATOR instead of '\0' static bool IsUrl(LPCTSTR szString) { - while(szString[0] != 0 && szString[0] != '*') + while(szString[0] != 0 && szString[0] != CASC_PARAM_SEPARATOR) { // Check for "://" if(!_tcsncmp(szString, _T("://"), 3)) @@ -1276,7 +1273,7 @@ static LPTSTR GetNextParam(LPTSTR szParamsPtr, bool bMustBeUrl = false) if(szParamsPtr != NULL) { // Find the separator ("*") or end of string - if((szSeparator = _tcschr(szParamsPtr, _T('*'))) != NULL) + if((szSeparator = _tcschr(szParamsPtr, _T(CASC_PARAM_SEPARATOR))) != NULL) { // Check for URL pattern, if needed if(bMustBeUrl && IsUrl(szSeparator + 1) == false) |