ImportMCM(): forgot to close input stream
This commit is contained in:
parent
e0aa4b15da
commit
dae469543e
|
@ -871,6 +871,7 @@ namespace BizHawk.MultiClient
|
||||||
errorMsg = "";
|
errorMsg = "";
|
||||||
warningMsg = "";
|
warningMsg = "";
|
||||||
Movie m = new Movie(Path.ChangeExtension(path, ".tas"), MOVIEMODE.PLAY);
|
Movie m = new Movie(Path.ChangeExtension(path, ".tas"), MOVIEMODE.PLAY);
|
||||||
|
bool success = false;
|
||||||
|
|
||||||
// Unless otherwise noted, all values are little-endian.
|
// Unless otherwise noted, all values are little-endian.
|
||||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||||
|
@ -941,12 +942,12 @@ namespace BizHawk.MultiClient
|
||||||
m.AppendFrame(mg.GetControllersAsMnemonic());
|
m.AppendFrame(mg.GetControllersAsMnemonic());
|
||||||
}
|
}
|
||||||
|
|
||||||
return m;
|
success = true;
|
||||||
|
|
||||||
FAIL:
|
FAIL:
|
||||||
|
if(!success) m = null;
|
||||||
r.Close();
|
r.Close();
|
||||||
fs.Close();
|
fs.Close();
|
||||||
return null;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
// MC2 file format: http://code.google.com/p/pcejin/wiki/MC2
|
// MC2 file format: http://code.google.com/p/pcejin/wiki/MC2
|
||||||
|
|
Loading…
Reference in New Issue