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 triple null termination utf-16 little endian. #36

Merged
merged 2 commits into from
Apr 1, 2018

Conversation

mkrogh
Copy link
Contributor

@mkrogh mkrogh commented Mar 31, 2018

When fixing result[1] result[0] should be fixed as well.

When fixing result[1] result[0] should be fixed as well.
@blimmo
Copy link

blimmo commented Mar 31, 2018

Thanks!

This fixes #35

@dhowden
Copy link
Owner

dhowden commented Apr 1, 2018

Great, thanks for the patch!

I'm seeing a panic for one of my MP3 files with this change when len(result[1]) == 0 (i.e. results[1][0] does not exist). I'll see if I can make a better test example to demonstrate.

@mkrogh
Copy link
Contributor Author

mkrogh commented Apr 1, 2018

Should that not be handled by the if len(result[1]) == 0 { check on line 367?

Actually my bad, line 373 and 374 should be switch around when done like this. My original patch was to append byte(0), but that felt wrong. But let me update the pull request.

@dhowden dhowden merged commit f4ddc56 into dhowden:master Apr 1, 2018
@dhowden
Copy link
Owner

dhowden commented Apr 1, 2018

Awesome, thanks. I ended up with the same change too, but then got carried away making other alterations.

@blimmo blimmo mentioned this pull request Apr 1, 2018
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.

3 participants