From chris.kcat at gmail.com Sat Dec 13 16:15:55 2014 From: chris.kcat at gmail.com (Chris Robinson) Date: Sat, 13 Dec 2014 13:15:55 -0800 Subject: [physfs] End-of-file seek error Message-ID: <548CAC8B.7070903@gmail.com> I noticed this occurring when libmpg123 would try to seek to the end of a file to get its length and PHYSFS_seek would return an error when specifying the (valid) file length as the offset, but only when using certain archive formats (I initially noticed with .wad files). I believe I've tracked the cause down to UNPK_seek: The line BAIL_IF_MACRO(offset >= entry->size, PHYSFS_ERR_PAST_EOF, 0); causes it to error when the offset is equal to the file's size, not just past it. Other archive handlers that don't rely on UNPK_seek (such as native directories and 7z/lzma) work as expected, allowing libmpg123 to seek to the end of the file without issue.