mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[12169] Fix some problems detected by static code analysis
This commit is contained in:
parent
62118e099e
commit
b8b907c138
4 changed files with 6 additions and 5 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue