From 0c35f03188f4cc7c5b8b681168b5f7545af004db Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 28 May 2018 00:08:04 +0300 Subject: Fix implicit cast in map.cpp --- src/resources/map/map.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/resources/map') diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index 810791222..adda1bcb7 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -1009,7 +1009,8 @@ Path Map::findPath(const int startX, const int startY, forbidden here. */ const int dx1 = std::abs(x - destX); newTile->Hcost = std::abs(dx1 - dy1) * basicCost + - std::min(dx1, dy1) * (basicCostF); + CAST_S32(static_cast(std::min(dx1, dy1)) * + (basicCostF)); // Set the current tile as the parent of the new tile newTile->parentX = curr.x; -- cgit v1.2.3-70-g09d2