| 1433 | // Local functions - partial stream support |
| 1434 | |
| 1435 | static bool IsPartHeader(PPART_FILE_HEADER pPartHdr) |
| 1436 | { |
| 1437 | // Version number must be 2 |
| 1438 | if(pPartHdr->PartialVersion == 2) |
| 1439 | { |
| 1440 | // GameBuildNumber must be an ASCII number |
| 1441 | if(isdigit(pPartHdr->GameBuildNumber[0]) && isdigit(pPartHdr->GameBuildNumber[1]) && isdigit(pPartHdr->GameBuildNumber[2])) |
| 1442 | { |
| 1443 | // Block size must be power of 2 |
| 1444 | if((pPartHdr->BlockSize & (pPartHdr->BlockSize - 1)) == 0) |
| 1445 | return true; |
| 1446 | } |
| 1447 | } |
| 1448 | |
| 1449 | return false; |
| 1450 | } |
| 1451 | |
| 1452 | static DWORD PartStream_CheckFile(TBlockStream * pStream) |
| 1453 | { |
no outgoing calls
no test coverage detected