skip invalid commands in type 1 command definitions

This commit is contained in:
Eliot Jones
2019-05-19 12:58:49 +01:00
parent 7e8f3623a4
commit 872e338ecb
2 changed files with 7 additions and 1 deletions

View File

@@ -83,7 +83,8 @@
if (command == null)
{
throw new InvalidOperationException($"Could not find command with code {b}.");
// Treat as invalid but skip
continue;
}
interpreted.Add(new Union<decimal, LazyType1Command>.Case2(command));

View File

@@ -34,5 +34,10 @@
Subroutine,
Charstring
}
public override string ToString()
{
return $"{Name} {Source} {Index} {Bytes.Count} bytes";
}
}
}