fix: fixed parsing of “a” dump flag

This commit is contained in:
Michael Green
2023-02-21 23:07:07 +11:00
parent 4c844f99cd
commit 3491968519
2 changed files with 43 additions and 30 deletions

View File

@@ -434,37 +434,45 @@ namespace gaseous_identifier.classes
if (dToken.Length > 0)
{
string[] dTokenCompare = dToken.Split(" ");
switch (dTokenCompare[0].Trim().ToLower())
if (dTokenCompare[0].Trim().ToLower().StartsWith("a"))
{
case "cr":
// cracked
case "f":
// fixed
case "h":
// hacked
case "m":
// modified
case "p":
// pirated
case "t":
// trained
case "tr":
// translated
case "o":
// overdump
case "u":
// underdump
case "v":
// virus
case "b":
// bad dump
case "a":
// alternate
case "!":
// known verified dump
// -------------------
romObject.flags.Add(dToken);
break;
romObject.flags.Add(dTokenCompare[0].Trim());
}
else
{
switch (dTokenCompare[0].Trim().ToLower())
{
case "cr":
// cracked
case "f":
// fixed
case "h":
// hacked
case "m":
// modified
case "p":
// pirated
case "t":
// trained
case "tr":
// translated
case "o":
// overdump
case "u":
// underdump
case "v":
// virus
case "b":
// bad dump
case "a":
// alternate
case "!":
// known verified dump
// -------------------
romObject.flags.Add(dToken);
break;
}
}
}

View File

@@ -38,6 +38,11 @@ namespace gaseous_identifier.objects
public string? Language { get; set; }
public string? Copyright { get; set; }
public List<Rom> Roms { get; set; } = new List<Rom>();
public int RomCount { get
{
return Roms.Count();
}
}
public enum DemoTypes
{