[DatFile] Fix CMP date tag parsing

This commit is contained in:
Matt Nadareski
2017-03-01 13:10:35 -08:00
parent 02874111bd
commit 7fbdf87a42

View File

@@ -707,11 +707,19 @@ namespace SabreTools.Helper.Dats
break;
case "date":
if (item.Type == ItemType.Rom)
{
// If we have quotes in the next item, assume only one item
if (gc[i + 1].Contains("\""))
{
quoteless = gc[++i].Replace("\"", "");
}
// Otherwise, we assume we need to read the next two items
else
{
quoteless = gc[++i].Replace("\"", "") + " " + gc[++i].Replace("\"", "");
}
((Rom)item).Date = quoteless;
}
i++;
break;
}
}