For files like PATCH, which only contain EKey in the build file
| 431 | |
| 432 | // For files like PATCH, which only contain EKey in the build file |
| 433 | static DWORD LoadEKeyEntry(TCascStorage * hs, const char * szVariableName, const char * szDataPtr, const char * szDataEnd, void * pvParam) |
| 434 | { |
| 435 | PCASC_CKEY_ENTRY pCKeyEntry = (PCASC_CKEY_ENTRY)pvParam; |
| 436 | DWORD dwErrCode; |
| 437 | |
| 438 | // Load the entry as if it was a CKey. Then move CKey into EKey and adjust flags |
| 439 | if((dwErrCode = LoadCKeyEntry(hs, szVariableName, szDataPtr, szDataEnd, pvParam)) == ERROR_SUCCESS) |
| 440 | { |
| 441 | if((pCKeyEntry->Flags & (CASC_CE_HAS_CKEY | CASC_CE_HAS_EKEY | CASC_CE_HAS_EKEY_PARTIAL)) == CASC_CE_HAS_CKEY) |
| 442 | { |
| 443 | // Move the CKey into EKey |
| 444 | CopyMemory16(pCKeyEntry->EKey, pCKeyEntry->CKey); |
| 445 | ZeroMemory16(pCKeyEntry->CKey); |
| 446 | |
| 447 | // Adjust flags |
| 448 | pCKeyEntry->Flags = (pCKeyEntry->Flags & ~CASC_CE_HAS_CKEY) | CASC_CE_HAS_EKEY; |
| 449 | } |
| 450 | } |
| 451 | |
| 452 | return dwErrCode; |
| 453 | } |
| 454 | |
| 455 | static DWORD LoadVfsRootEntry(TCascStorage * hs, const char * szVariableName, const char * szDataPtr, const char * szDataEnd, void * pvParam) |
| 456 | { |
nothing calls this directly
no test coverage detected