From 810bad9fd8cf344f7d73b82f042910a4c443b0f7 Mon Sep 17 00:00:00 2001 From: erorcun Date: Fri, 29 Jan 2021 01:44:33 +0300 Subject: Fix some UBs --- src/control/PathFind.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/control/PathFind.cpp') diff --git a/src/control/PathFind.cpp b/src/control/PathFind.cpp index 2d3972f6..bf72199d 100644 --- a/src/control/PathFind.cpp +++ b/src/control/PathFind.cpp @@ -859,7 +859,7 @@ CPathFind::PreparePathDataForType(uint8 type, CTempNode *tempnodes, CPathInfoFor mag = Sqrt(dx*dx + dy*dy); dx /= mag; dy /= mag; - int width = Max(m_pathNodes[i].width, m_pathNodes[j].width); + uint8 width = Max(m_pathNodes[i].width, m_pathNodes[j].width); if(i < j){ dx = -dx; dy = -dy; -- cgit v1.2.3