File: 0005-fix-invalid-assert-dtAssert-npath-m_maxPath-619.patch

package info (click to toggle)
recastnavigation 1.6.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,892 kB
  • sloc: cpp: 50,116; ansic: 2,674; xml: 182; makefile: 16
file content (25 lines) | stat: -rw-r--r-- 877 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 9147d0955358212a13e336b97e2ebe50fa069ab2 Mon Sep 17 00:00:00 2001
From: nicknide <35698604+nicknide@users.noreply.github.com>
Date: Mon, 24 Jul 2023 04:22:37 +0800
Subject: [PATCH 05/36] fix invalid assert dtAssert(npath < m_maxPath) (#619)

---
 DetourCrowd/Source/DetourPathCorridor.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/DetourCrowd/Source/DetourPathCorridor.cpp b/DetourCrowd/Source/DetourPathCorridor.cpp
index e54d463..bddea5a 100644
--- a/DetourCrowd/Source/DetourPathCorridor.cpp
+++ b/DetourCrowd/Source/DetourPathCorridor.cpp
@@ -512,7 +512,7 @@ void dtPathCorridor::setCorridor(const float* target, const dtPolyRef* path, con
 {
 	dtAssert(m_path);
 	dtAssert(npath > 0);
-	dtAssert(npath < m_maxPath);
+	dtAssert(npath <= m_maxPath);
 	
 	dtVcopy(m_target, target);
 	memcpy(m_path, path, sizeof(dtPolyRef)*npath);
-- 
2.43.0