WiresmithTech / tedium

3 stars 1 forks source link

Handle Unknown Next Segment Offset #34

Open JamesMc86 opened 1 year ago

JamesMc86 commented 1 year ago

It is considered a valid state when the next segment offset for the last segment is set to 0xFFFFFFFF. In this case it should be assumed as the end of the file.

We need to test for this case and handle any failures.

In addition, if a file end is clipped there may be a value that is invalid.

The NI library still allows reads of valid segments. I feel like we need to let the user know this has happened somehow. Perhaps as an optional way to load the file so it fails if we have signs of a crash? and/or a property on the file you can check if it is complete.