ImportMCM(): forgot to close input stream

This commit is contained in:
taotao54321 2012-03-09 12:18:16 +00:00
parent e0aa4b15da
commit dae469543e
1 changed files with 4 additions and 3 deletions

View File

@ -871,6 +871,7 @@ namespace BizHawk.MultiClient
errorMsg = "";
warningMsg = "";
Movie m = new Movie(Path.ChangeExtension(path, ".tas"), MOVIEMODE.PLAY);
bool success = false;
// Unless otherwise noted, all values are little-endian.
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
@ -941,12 +942,12 @@ namespace BizHawk.MultiClient
m.AppendFrame(mg.GetControllersAsMnemonic());
}
return m;
success = true;
FAIL:
if(!success) m = null;
r.Close();
fs.Close();
return null;
return m;
}
// MC2 file format: http://code.google.com/p/pcejin/wiki/MC2