[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

@@ -708,10 +708,18 @@ namespace SabreTools.Helper.Dats
case "date": case "date":
if (item.Type == ItemType.Rom) if (item.Type == ItemType.Rom)
{ {
quoteless = gc[++i].Replace("\"", "") + " " + gc[++i].Replace("\"", ""); // 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; ((Rom)item).Date = quoteless;
} }
i++;
break; break;
} }
} }