mirror of
https://github.com/holub/mame
synced 2025-05-16 10:52:43 +03:00
Fix assert when saving snapshots beyond the first.
This commit is contained in:
parent
9ff458e52f
commit
5140c0e6a0
@ -1202,13 +1202,13 @@ file_error video_manager::open_next(emu_file &file, const char *extension)
|
||||
{
|
||||
// try until we succeed
|
||||
astring seqtext;
|
||||
file.set_openflags(OPEN_FLAG_READ);
|
||||
for (int seq = 0; ; seq++)
|
||||
{
|
||||
// build up the filename
|
||||
fname.cpy(snapstr).replace(0, "%i", seqtext.format("%04d", seq).cstr());
|
||||
|
||||
// try to open the file; stop when we fail
|
||||
file.set_openflags(OPEN_FLAG_READ);
|
||||
file_error filerr = file.open(fname);
|
||||
if (filerr != FILERR_NONE)
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user