Returns a hash table entry in the following order: 1) A hash table entry with the preferred locale 2) NULL
| 655 | // 1) A hash table entry with the preferred locale |
| 656 | // 2) NULL |
| 657 | static TMPQHash * GetHashEntryExact(TMPQArchive * ha, const char * szFileName, LCID lcLocale) |
| 658 | { |
| 659 | TMPQHash * pFirstHash = GetFirstHashEntry(ha, szFileName); |
| 660 | TMPQHash * pHash = pFirstHash; |
| 661 | |
| 662 | // Parse the found hashes |
| 663 | while(pHash != NULL) |
| 664 | { |
| 665 | // If the locales match, return it |
| 666 | if(pHash->lcLocale == lcLocale) |
| 667 | return pHash; |
| 668 | |
| 669 | // Get the next hash entry for that file |
| 670 | pHash = GetNextHashEntry(ha, pFirstHash, pHash); |
| 671 | } |
| 672 | |
| 673 | // Not found |
| 674 | return NULL; |
| 675 | } |
| 676 | |
| 677 | // Defragment the file table so it does not contain any gaps |
| 678 | // Note: As long as all values of all TMPQHash::dwBlockIndex |
no test coverage detected