SCUMM: Bad memory access in filename substitution
|Reported by:||eriktorbjorn||Owned by:||cyxx|
This happens in the latest CVS snapshot, at least, and has been happening for a while.
In some cases, the generateSubstResFileName_() is called with 'filename' being an empty string. In this case, it will be accessing filename[-1], which could be bad.
I'm not sure exactly when this happens - I'm filing this just so that Eugene won't forget about it - but I'll give two examples of games where it happens for me:
* Monkey Island 1, data files monkey1.000 and monkey1.001. To run this, I use a "monkey1" target.
* The FM-Towns Fate of Atlantis demo. To run this, I use a "atlantisa" target.
Ticket imported from: #1368343. Ticket imported from: bugs/2387.