mirror of
https://github.com/holub/mame
synced 2025-05-16 19:00: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
|
// try until we succeed
|
||||||
astring seqtext;
|
astring seqtext;
|
||||||
|
file.set_openflags(OPEN_FLAG_READ);
|
||||||
for (int seq = 0; ; seq++)
|
for (int seq = 0; ; seq++)
|
||||||
{
|
{
|
||||||
// build up the filename
|
// build up the filename
|
||||||
fname.cpy(snapstr).replace(0, "%i", seqtext.format("%04d", seq).cstr());
|
fname.cpy(snapstr).replace(0, "%i", seqtext.format("%04d", seq).cstr());
|
||||||
|
|
||||||
// try to open the file; stop when we fail
|
// try to open the file; stop when we fail
|
||||||
file.set_openflags(OPEN_FLAG_READ);
|
|
||||||
file_error filerr = file.open(fname);
|
file_error filerr = file.open(fname);
|
||||||
if (filerr != FILERR_NONE)
|
if (filerr != FILERR_NONE)
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user