BaldrDash / recastnavigation

Automatically exported from code.google.com/p/recastnavigation
zlib License
0 stars 0 forks source link

rcBuildHeightfieldLayers: check to prevent overflow of unsigned char is wrong #233

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I recently started using dtTileCache in my project and came upon this issue a 
lot when testing.

Sometimes, the Navigation Mesh in a tile would be below where it was supposed 
to be.

I tracked the issue down to an overflow of the unsigned char data type used to 
store the layer heights.

I was able to replicate the symptom of the issue in the Recast Demo by using 
some geometry from my project.

Images showing the symptom of the issue:
http://imgur.com/GHgEkJp,Q4gg1C4,9PNyAiP

3rd image is what happens after the attached patch is applied with the exact 
same Navigation Mesh generation parameters.

This issue causes the affected area to be rendered unnavigable

Original issue reported on code.google.com by cmf1206 on 26 Feb 2013 at 8:33

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed at github repo:
https://github.com/memononen/recastnavigation

Original comment by memono...@gmail.com on 17 Sep 2013 at 7:13