| 1474 | // Local functions - partial stream support |
| 1475 | |
| 1476 | static bool IsPartHeader(PPART_FILE_HEADER pPartHdr) |
| 1477 | { |
| 1478 | // Version number must be 2 |
| 1479 | if(pPartHdr->PartialVersion == 2) |
| 1480 | { |
| 1481 | // GameBuildNumber must be an ASCII number |
| 1482 | if(isdigit(pPartHdr->GameBuildNumber[0]) && isdigit(pPartHdr->GameBuildNumber[1]) && isdigit(pPartHdr->GameBuildNumber[2])) |
| 1483 | { |
| 1484 | // Block size must be power of 2 |
| 1485 | if((pPartHdr->BlockSize & (pPartHdr->BlockSize - 1)) == 0) |
| 1486 | return true; |
| 1487 | } |
| 1488 | } |
| 1489 | |
| 1490 | return false; |
| 1491 | } |
| 1492 | |
| 1493 | static DWORD PartStream_CheckFile(TBlockStream * pStream) |
| 1494 | { |
no outgoing calls
no test coverage detected