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

PlayerKernel.open() throws exception when opening ISpecialFile file with O_TRUNC #91

Open
testpoiu opened this issue Sep 7, 2015 · 0 comments

Comments

@testpoiu
Copy link

testpoiu commented Sep 7, 2015

O_TRUNC will make fileentry.bytes.length = 0, but this throws a null pointer exception when fileentry.bytes is not set (which can be the case for ISpecialFile entries). Easily fixed:

if ( fileentry.bytes ) fileentry.bytes.length = 0

A real fix might call on ISpecialFile, which would require a new method such as truncate().

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

No branches or pull requests

1 participant