Fix for cassette (no whatsnew)

This commit is contained in:
Miodrag Milanovic 2012-01-17 08:55:52 +00:00
parent 81d3e50238
commit 49192fb69a

View File

@ -270,10 +270,11 @@ bool cassette_image_device::call_load()
{
is_writable = !is_readonly();
cassette_flags = is_writable ? (CASSETTE_FLAG_READWRITE|CASSETTE_FLAG_SAVEONEXIT) : CASSETTE_FLAG_READONLY;
astring fname = astring(m_mame_file->filename());
astring fname;
if (software_entry()==NULL) {
extension = filetype();
} else {
fname = m_mame_file->filename();
int loc = fname.rchr(0,'.');
if (loc!=-1) {
extension = fname.substr(loc + 1,fname.len()-loc).cstr();