| 61 | } |
| 62 | |
| 63 | static void ListFile_CheckFormat(PLISTFILE_CACHE pCache) |
| 64 | { |
| 65 | const size_t nSizeLimit = 0x20; |
| 66 | |
| 67 | // Only if the listfile is greater than 2 MB |
| 68 | if((pCache->pEnd - pCache->pBegin) > nSizeLimit) |
| 69 | { |
| 70 | char * szPtr = pCache->pBegin; |
| 71 | size_t nDigitCount = 0; |
| 72 | |
| 73 | // Calculate the amount of digits |
| 74 | while(nDigitCount <= nSizeLimit && '0' <= szPtr[nDigitCount] && szPtr[nDigitCount] <= '9') |
| 75 | nDigitCount++; |
| 76 | |
| 77 | // There must be a semicolon after |
| 78 | if(nDigitCount <= 10 && szPtr[nDigitCount] == ';') |
| 79 | { |
| 80 | pCache->Flags |= LISTFILE_FLAG_USES_FILEDATAID; |
| 81 | } |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | static int ListFile_GetFileDataId(PLISTFILE_CACHE pCache, PDWORD PtrFileDataId) |
| 86 | { |
no outgoing calls
no test coverage detected