Closed sigeryang closed 11 months ago
Thanks for your report!
In the given test case, the enumeration does not match the data, so parsing has failed. When this happens, the parser attempts to restore the position of the data stream so it is not left in an indeterminate state. This is expected behaviour. However, the original error should not be lost. I have added a patch to binrw to ensure the original error is retained when this happens, which should resolve this issue. Let me know if you have any questions about this.
Minimal example:
Output: