gl-terrain-demo icon indicating copy to clipboard operation
gl-terrain-demo copied to clipboard

Out of bounds access

Open urosidoki opened this issue 3 years ago • 1 comments

https://github.com/itoral/gl-terrain-demo/blob/efbe5e77268f1c111ab6bc52a45a86d8ebad9655/src/ter-terrain.cpp#L209

I think here you can have other out of bound access. You iterate over the whole loop but inside calculate_normals you do a + 1.

I found these issues because I use your code as reference for a terrain system in my own game engine :)

Cheers,

urosidoki avatar Jan 10 '22 19:01 urosidoki

Yes, I guess we would probably want to workaround this like we do for x=0 and z= 0, but on the other side of the spectrum.

itoral avatar Jan 11 '22 07:01 itoral