[Scummvm-git-logs] scummvm master -> d12e5daf689e56fe49554d8f11678a46e942ff7e

grisenti noreply at scummvm.org
Fri Feb 24 18:34:23 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
d12e5daf68 HPL1: fix incorrect iterator comparison


Commit: d12e5daf689e56fe49554d8f11678a46e942ff7e
    https://github.com/scummvm/scummvm/commit/d12e5daf689e56fe49554d8f11678a46e942ff7e
Author: grisenti (emanuele at grisenti.net)
Date: 2023-02-24T19:34:10+01:00

Commit Message:
HPL1: fix incorrect iterator comparison

Changed paths:
    engines/hpl1/engine/ai/AStar.cpp


diff --git a/engines/hpl1/engine/ai/AStar.cpp b/engines/hpl1/engine/ai/AStar.cpp
index e8675c2bb68..7086ccf2f45 100644
--- a/engines/hpl1/engine/ai/AStar.cpp
+++ b/engines/hpl1/engine/ai/AStar.cpp
@@ -253,9 +253,9 @@ void cAStarHandler::AddOpenNode(cAINode *apAINode, cAStarNode *apParent, float a
 		return;
 	}
 
-	// Try to add it to the open list
+	// Add it if it wasn't already inserted
 	const auto test = m_setOpenList.find(pNode);
-	if (test == m_setOpenList.end()) {
+	if (test != m_setOpenList.end()) {
 		hplDelete(pNode);
 		return;
 	}




More information about the Scummvm-git-logs mailing list