notandy/hotline-miami-extract — pull request #1 by jamslater (2013-08-19 19:01:01+00:00)
Title: Check header sanity instead of magic number

My copy of HotlineMiami_GL.wad failed the magic number check. Commenting
it out worked fine.

The "magic number" (0x782A in my case) matches the file position reached
immediately after parsing the header. A test at that point seems a bit
pointless - we'd probably have crashed by then on the wrong file anyway.

A simple sanity check on the claimed size of the header seems robust
enough for such a simple tool. It's enough to prevent it from running
against every Hotline Miami file except the WAD, at least.