iOS GLES20 LoadImageData crash

Monkey Forums/Monkey Bug Reports/iOS GLES20 LoadImageData crash

nullterm(Posted 2015) [#1]
Using glTexImage2D to load a texture and I was getting a crash in modules/opengl/native/gles20.ios.cpp, function LoadImageData.

	free( src );


The code is trying to free "src" memory, but src was previously incremented as the image data was read.



I fixed locally by adding a srcStart that is passed to free and fixes the iOS crash.




marksibly(Posted 2015) [#2]
Oh dear, stupid bug - thanks for finding it!


nullterm(Posted 2015) [#3]
No worries! One of those sweet, innocent, little bugs that love to slip under the radar.

Glad I could stomp it. : ) Haven't had this much fun coding for YEARS since I found out about monkey a few weeks ago, happy to help improve it even in the tiniest way.