Problem with opening jpg files (creating textures, spites etc.) + FIX

Hi!

I have found a bug in CCImage_marmalde.cpp file in method bool CCImage::_initWithJpgData(void * data, int nSize).
The files are opened s3eFileOpenFromMemory() but not closed.

Fix for it is to add this code:

s3eFileClose(pFile);
pFile=0;

at the end of the method.

Best Regards
PS

Thanks a lot for your help!
We’ll include your fix in the next release.

Regards,
G.

I’m finally getting around to updating all my code and noticed that the change above is now missing in cocos2d-1.0.1-x-0.13.0-beta, it was in my previous version.

Was this intentional or a merging error?

Francis