thtk
thtk copied to clipboard
duplicate entries in dat files
th17.dat entries under indices 143 and 155 have completely identical filenames (e01.anm) and contents.
When extracting the whole archive, thdat dumps all files in order, and you end up with 155 on disk. When e01.anm is specified on the command line, it dumps the first file in the archive that has the matching filename, i.e. 143. ZUN's code prefers earlier files.
This edge case probably should be handled in some way. (e.g. warnings, ability to extract by index, etc)