Skip to content

Fix bug in tosc_reset#11

Open
cmoore42 wants to merge 1 commit intomhroth:masterfrom
cmoore42:fix-tosc-reset
Open

Fix bug in tosc_reset#11
cmoore42 wants to merge 1 commit intomhroth:masterfrom
cmoore42:fix-tosc-reset

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