Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Did the testing to see if I can put the error handling when the offset is set to an il-formatted value, and that doesn't appear to work. This is the demonstration I used to test that, and it started throwing `DataView` errors again, meaning that it can't catch it in that order. Thinking of it now, that makes sense. I think the only reason that kind of worked before, was because in the instance of the `#readString()` function, `Uint8Array.subarray()` will simply return a shorter-length view of the remaining data, rather than erroring-out and saying that the offset is outside the bounds, unline the `DataView.get*()` functions, since those *will* error out if the data can't be read at that offset. So, I may rework the wording or the code formatting, but I think it has to catch the offset issues in this order for it to work. Nice find! *Edit: Try this out! This is what I was mentioning about what was happening for the `#readString()` function. Glad to have also found this! ```js new Uint8Array(10).subarray(0,24) ```
- Loading branch information