diff --git a/src/core/fex/fex.h b/src/core/fex/fex.h index 0835b811..1f6d5418 100644 --- a/src/core/fex/fex.h +++ b/src/core/fex/fex.h @@ -56,7 +56,7 @@ int fex_has_extension(const char str[], const char extension[]); Returns usual file extension this should have (e.g. ".zip", ".gz", etc.). Returns "" if file header is not recognized. */ const char *fex_identify_header(const void *header); -enum { fex_identify_header_size = 263 }; +enum { fex_identify_header_size = 16 }; /** Determines type based on extension of a file path, or just a lone extension (must include '.', e.g. ".zip", NOT just "zip"). Returns NULL if extension is diff --git a/src/core/fex/fex/fex.cpp b/src/core/fex/fex/fex.cpp index 86674119..3b4dde12 100644 --- a/src/core/fex/fex/fex.cpp +++ b/src/core/fex/fex/fex.cpp @@ -72,9 +72,6 @@ BLARGG_EXPORT const char* fex_identify_header( void const* header ) { unsigned char *data = (unsigned char *)header; - if ((data[257] == 0x75) || (data[258] == 0x73) || (data[259] == 0x74) || (data[260] == 0x61) || (data[261] == 0x72) || (data[262] == 0x00)) - return ".tar"; - if ((data[0] == 0xFD) || (data[1] == 0x37) || (data[2] == 0x7A) || (data[3] == 0x58) || (data[4] == 0x5A) || (data[5] == 0x00)) return ".xz";