DataArea width to long?

This commit is contained in:
Matt Nadareski
2020-09-04 10:32:43 -07:00
parent 7f8766b0a4
commit 120dcd6c4a
4 changed files with 22 additions and 9 deletions

View File

@@ -390,7 +390,8 @@ namespace SabreTools.Library.DatItems
if (DataArea == null)
DataArea = new DataArea();
DataArea.Width = mappings[Field.DatItem_AreaWidth];
if (Int64.TryParse(mappings[Field.DatItem_AreaWidth], out long areaWidth))
DataArea.Width = areaWidth;
}
if (mappings.Keys.Contains(Field.DatItem_AreaEndianness))
@@ -908,9 +909,9 @@ namespace SabreTools.Library.DatItems
return false;
// Filter on area byte width
if (filter.DatItem_AreaWidth.MatchesPositiveSet(DataArea?.Width) == false)
if (filter.DatItem_AreaWidth.MatchesPositive(null, DataArea?.Width) == false)
return false;
if (filter.DatItem_AreaWidth.MatchesNegativeSet(DataArea?.Width) == true)
if (filter.DatItem_AreaWidth.MatchesNegative(null, DataArea?.Width) == true)
return false;
// Filter on area endianness