From 816c99aa3e333a10dbb0beb1343ce904683fa783 Mon Sep 17 00:00:00 2001 From: Mikko Mononen Date: Tue, 17 Sep 2013 21:12:43 +0200 Subject: [PATCH] Fixed google code Issue 233 --- Recast/Source/RecastLayers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Recast/Source/RecastLayers.cpp b/Recast/Source/RecastLayers.cpp index c616810..204f72e 100644 --- a/Recast/Source/RecastLayers.cpp +++ b/Recast/Source/RecastLayers.cpp @@ -325,7 +325,7 @@ bool rcBuildHeightfieldLayers(rcContext* ctx, rcCompactHeightfield& chf, continue; // Skip if the height range would become too large. const int ymin = rcMin(root.ymin, regn.ymin); - const int ymax = rcMin(root.ymax, regn.ymax); + const int ymax = rcMax(root.ymax, regn.ymax); if ((ymax - ymin) >= 255) continue; @@ -373,7 +373,7 @@ bool rcBuildHeightfieldLayers(rcContext* ctx, rcCompactHeightfield& chf, continue; // Skip if the height range would become too large. const int ymin = rcMin(ri.ymin, rj.ymin); - const int ymax = rcMin(ri.ymax, rj.ymax); + const int ymax = rcMax(ri.ymax, rj.ymax); if ((ymax - ymin) >= 255) continue;