Fix crash in dmd5 format found by Alexander Cherepanov

(don't you just hate that guy?) ;)
Merge pull request #258 from kholia/dmd5-fixes

Fix crash in dmd5 format found by Alexander Cherepanov