[12169] Fix some problems detected by static code analysis

This commit is contained in:
zerg 2012-09-02 13:14:02 +06:00 committed by Antz
parent 62118e099e
commit b8b907c138
4 changed files with 6 additions and 5 deletions

View file

@ -581,7 +581,7 @@ uint32 PathFinder::fixupCorridor(dtPolyRef* path, uint32 npath, uint32 maxPath,
// Adjust beginning of the buffer to include the visited.
uint32 req = nvisited - furthestVisited;
uint32 orig = uint32(furthestPath + 1) < npath ? furthestPath + 1 : npath;
uint32 size = npath - orig > 0 ? npath - orig : 0;
uint32 size = npath > orig ? npath - orig : 0;
if (req + size > maxPath)
size = maxPath - req;