DiscSystem MDS: version check

This commit is contained in:
Asnivor 2017-10-26 17:19:47 +01:00 committed by nattthebear
parent 9693d812d2
commit 7eee1c0f8f
1 changed files with 8 additions and 0 deletions

View File

@ -309,6 +309,14 @@ namespace BizHawk.Emulation.DiscSystem
// parse header
aFile.Header = aFile.Header.Parse(stream);
// check version to make sure this is only v1.x
// currently NO support for version 2.x
if (aFile.Header.Version[0] > 1)
{
throw new MDSParseException("MDS Parse Error: Only MDS version 1.x is supported!\nDetected version: " + aFile.Header.Version[0] + "." + aFile.Header.Version[1]);
}
// parse sessions
Dictionary<int, ASession> aSessions = new Dictionary<int, ASession>();