-
Notifications
You must be signed in to change notification settings - Fork 34
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
DAEParser.supportsData assumes ByteArrayData.position is 0 #10
Comments
Thank you! I think the following commit may resolve the problem, but please test it and see if it does for you: If this is too simple of a solution, using the utility is probably fine. Let me know, thanks 😄 |
Thank you, I tested it on Neko, C++, and HTML5 and I can confirm it works now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found that if I enabled the default parsers and include my own custom subclassed parsers, it will throw an EOF error:
The custom classes I used
ParserUtil.toString(data)
to convert it to a string similar to the existing parsers likeOBJParser
. However,DAEParser
diverges from the Flash code and usesreadUTFBytes()
directly which makes an assumption that the byte array position is 0. Since the parsers ahead of it mutated the byte array, this becomes not true.I guess the best fix is to use existing helper function
ParserUtil.toString
withinsupportsData()
that sets the position before reading the byte array.The text was updated successfully, but these errors were encountered: