On Wed Feb 5 15:45:03 2025 +0000, Yuxuan Shui wrote:
`!read` was changed to `read < sizeof(magic)` because of @rbernon's suggestion: https://gitlab.winehq.org/wine/wine/-/merge_requests/5081#note_61500 . Think malformed MIDI files with trailing bytes, etc. Also, because short read leave `magic` uninitialized, you can't then compare it to `"MTrk"`.
If there's any ambiguity on whether this is right or not, probably adding a couple of tests with a truncated MIDI track will answer the question.
Other than that the brace needs to be on its own line. The other change LGTM.