Skip to content
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

Fix bug in tosc_reset #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

cmoore42
Copy link

tosc_reset was operating on offsets based on the location of the format (o->format). When it came time to adjust the marker location to a multiple of 4 bytes it adjusted that index to a multiple of 4 bytes, which gives you a location aligned relative to o->format. But the location needs aligned relative to the entire buffer.

This change re-writes tosc_reset to operate entirely relative to the buffer start rather than to the start of the format.

tosc_reset was operating on offsets based on the location of the
format (o->format).  When it came time to adjust the marker
location to a multiple of 4 bytes it adjusted that index to
a multiple of 4 bytes, which gives you a location aligned
relative to o->format.  But the location needs aligned relative
to the entire buffer.

This change re-writes tosc_reset to operate entirely relative to
the buffer start rather than to the start of the format.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant