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 #48 #49

Merged
merged 2 commits into from
Dec 10, 2024
Merged

Fix #48 #49

merged 2 commits into from
Dec 10, 2024

Conversation

vphpersson
Copy link
Contributor

@vphpersson vphpersson commented Dec 7, 2024

Use the correct index for the extraction of the hook attribute value.

Use the correct index for the hook attribute value.
@vphpersson
Copy link
Contributor Author

My guess is that the code has in fact worked for you, but endianess is causing the code not to work for me. In that case the solution needs to be a little bit more complicated. Maybe something like this?

var hookIndex int
if nativeEndian == binary.LittleEndian {
	hookIndex = 2
} else {
	hookIndex = 3
}
hook := ad.Bytes()[hookIndex]
a.Hook = &hook

attribute.go Show resolved Hide resolved
Copy link
Owner

@florianl florianl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for your contribution!

@florianl florianl merged commit 18ba974 into florianl:main Dec 10, 2024
8 checks passed
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.

2 participants