adobe-flash/crossbridge

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

testpoiu opened this issue · 0 comments

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().