-
Notifications
You must be signed in to change notification settings - Fork 264
Stop adding extraneous metadata padding #593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
If the metadata field is already aligned to a 16-byte boundary then don't add a additional padding. This allows the user to create a 16-byte aligned extension padded with 0x20 that can be read by the Jim software (which doesn't like finding 0x00 in the metadata chunk).
Codecov Report
@@ Coverage Diff @@
## master #593 +/- ##
=========================================
- Coverage 94.46% 93.4% -1.06%
=========================================
Files 177 189 +12
Lines 24936 25820 +884
Branches 2659 2752 +93
=========================================
+ Hits 23556 24118 +562
- Misses 908 1205 +297
- Partials 472 497 +25
Continue to review full report at Codecov.
|
Good catch. Any chance of writing a test for this case? |
@effigies I've extended test_nifti1/test_extension_basics to cover this situation. Unfortunately coveralls is still showing that as a drop in coverage but both code paths are executed (unless I've missed something). |
The coverage checks can be a little weird at times. The main one I pay attention to is the diff. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Anybody else have comments?
For a small change like this, I'll merge in 24 hours unless someone objects.
Looks good to me too - thanks for the spot ... |
If the metadata field is already aligned to a 16-byte boundary then
don't add additional padding. This allows the user to create a
16-byte aligned extension padded with 0x20 that can be read by the Jim
software (which doesn't like finding 0x00 in the metadata chunk).